From: Steve Hancock Date: Mon, 8 Nov 2021 23:52:03 +0000 (-0800) Subject: add tokenizer tests X-Git-Tag: 20211029.01~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3e7b5ef6447d09510c90d96fdf9ab807b0344718;p=perltidy.git add tokenizer tests --- diff --git a/dev-bin/run_tokenizer_tests.pl.data b/dev-bin/run_tokenizer_tests.pl.data index c7255905..0ed184c8 100644 --- a/dev-bin/run_tokenizer_tests.pl.data +++ b/dev-bin/run_tokenizer_tests.pl.data @@ -122,3 +122,27 @@ index?#sc# "\n" ;#sc# }#sc# + +==> c103.in <== +print $l<3? $_ : $l & 4 ? --$_ ? $_ : "No more" : $l & 3 ? $_ > 1 ? "if one of those" : "if that" : "e", " cop", $_ ^ 1 ? "ies " : "y ", $l ^ 3 ? $l & 2 ? "w" : $l & 4 ? "z" : "y" : "x"; +print STDERR < BLABLA>; # ok prints the word 'BLABLA' +print STDERR ; # ok prints lines after __DATA__ +print STDERR < DATA>; # ok prints the word 'DATA' +print BLABLA ; # ok; does nothing unless BLABLA is defined +print STDOUT <>; # ok +print STDOUT < >; # ok +print STDOUT < 6>; # ok; prints '6' +print STDOUT < DATA>; # ok +print STDOUT ; # ok +print STDOUT ; # ok +print STDOUT < BUBBA>; # ok +print STDOUT <$BUBBA>; # ok +print $fh ; # ok +print $fh ; # ok +__END__ +print $fh < DATA>; # syntax error +print $fh < BUBBA>; # syntax error +print $fh <>; # syntax error +print $fh < >; # syntax error +print $fh < 6>; # error +print $fh <6>; # error