From 96ccae07958e7b6fe402e90d9540b49a274d5419 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 30 Nov 2022 15:07:21 +0100 Subject: [PATCH] t: different input options besides parameters --- t/regress.t | 2 +- t/t1704-input_separator.out | 4 ++++ t/t1705-input_twice.out | 7 +++++++ t/t1707-stdin.out | 4 ++++ t/t1708-empty_stdin.out | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 t/t1704-input_separator.out create mode 100644 t/t1705-input_twice.out create mode 100644 t/t1707-stdin.out create mode 100644 t/t1708-empty_stdin.out diff --git a/t/regress.t b/t/regress.t index c910748..a10827b 100755 --- a/t/regress.t +++ b/t/regress.t @@ -43,7 +43,7 @@ for my $candidate (@params) { my $shell = $script; if ($script =~ /\|/) { # explicit shell wrapper to capture all warnings - $script =~ s/'/'\\''/g; + $shell =~ s/'/'\\''/g; $shell = "sh -c '$shell'"; } $shell .= ' 2>' . ($wantwarn ? '&1' : '/dev/null'); diff --git a/t/t1704-input_separator.out b/t/t1704-input_separator.out new file mode 100644 index 0000000..6236534 --- /dev/null +++ b/t/t1704-input_separator.out @@ -0,0 +1,4 @@ +barcat -- input/seq3.txt +1 ------------- +2 ------------------------+ +3 ------------------------+----->------- diff --git a/t/t1705-input_twice.out b/t/t1705-input_twice.out new file mode 100644 index 0000000..53c9f03 --- /dev/null +++ b/t/t1705-input_twice.out @@ -0,0 +1,7 @@ +barcat input/seq3.txt input/seq3.txt +1 ------------- +2 ------------------------+ +3 ------------------------+----->------- +1 ------------- +2 ------------------------+ +3 ------------------------+----->------- diff --git a/t/t1707-stdin.out b/t/t1707-stdin.out new file mode 100644 index 0000000..a754b89 --- /dev/null +++ b/t/t1707-stdin.out @@ -0,0 +1,4 @@ +cat input/seq3.txt | barcat +1 ------------- +2 ------------------------+ +3 ------------------------+----->------- diff --git a/t/t1708-empty_stdin.out b/t/t1708-empty_stdin.out new file mode 100644 index 0000000..2256b6b --- /dev/null +++ b/t/t1708-empty_stdin.out @@ -0,0 +1 @@ +printf '' | barcat -- 2.30.0