diff --git a/tests/expand/expand.pl b/tests/expand/expand.pl index 167da7629..ee186e317 100755 --- a/tests/expand/expand.pl +++ b/tests/expand/expand.pl @@ -184,6 +184,10 @@ my @Tests = {ERR => "$prog: '/' specifier only allowed with the last value\n"}], ['e7', '--tabs=3/', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR => "$prog: '/' specifier not at start of number: '/'\n"}], + + # A bare '-' is standard input. + ['stdin-dash', '-', {IN_PIPE=>"stdin\n"}, {IN=>{f=>"file\n"}}, + {OUT=>"stdin\nfile\n"}], ); my $save_temps = $ENV{DEBUG}; diff --git a/tests/unexpand/unexpand.pl b/tests/unexpand/unexpand.pl index dd7853f21..a7b177987 100755 --- a/tests/unexpand/unexpand.pl +++ b/tests/unexpand/unexpand.pl @@ -136,6 +136,13 @@ my @Tests = ['ts1', '-t8,9', {IN=>"x\t \t y\n"}, {OUT=>"x\t\t\t y\n"}], # There is no ambiguity here. This should always be the output. ['ts2', '-t5,8', {IN=>"x\t \t y\n"}, {OUT=>"x\t\t y\n"}], + + # A bare '-' is standard input, not an obsolete -N tab stop list. + ['stdin-dash', '-', {IN_PIPE=>"stdin\n"}, {IN=>{f=>"file\n"}}, + {OUT=>"stdin\nfile\n"}], + ['stdin-dash-t', '-t 3 -', {IN_PIPE=>"a b\n"}, {OUT=>"a\tb\n"}], + ['stdin-dash-f', '--first-only -', {IN_PIPE=>" A B\n"}, + {OUT=>"\tA B\n"}], ); my $save_temps = $ENV{DEBUG};