Commit | Line | Data |
a0d0e21e |
1 | #!./perl |
2 | print "1..15\n"; |
3 | |
3524d3b9 |
4 | $_=join "", map chr($_), 32..127; |
a0d0e21e |
5 | |
3524d3b9 |
6 | # 96 characters - 52 letters - 10 digits - 1 underscore = 33 backslashes |
7 | # 96 characters + 33 backslashes = 129 characters |
a0d0e21e |
8 | $_=quotemeta $_; |
3524d3b9 |
9 | if ( length == 129 ){print "ok 1\n"} else {print "not ok 1\n"} |
10 | # 95 non-backslash characters |
11 | if (tr/\\//cd == 95){print "ok 2\n"} else {print "not ok 2\n"} |
a0d0e21e |
12 | |
a0d0e21e |
13 | if (length quotemeta "" == 0){print "ok 3\n"} else {print "not ok 3\n"} |
14 | |
15 | print "aA\UbB\LcC\EdD" eq "aABBccdD" ? "ok 4\n" : "not ok 4 \n"; |
16 | print "aA\LbB\UcC\EdD" eq "aAbbCCdD" ? "ok 5\n" : "not ok 5 \n"; |
17 | print "\L\upERL" eq "Perl" ? "ok 6\n" : "not ok 6 \n"; |
18 | print "\u\LpERL" eq "Perl" ? "ok 7\n" : "not ok 7 \n"; |
19 | print "\U\lPerl" eq "pERL" ? "ok 8\n" : "not ok 8 \n"; |
20 | print "\l\UPerl" eq "pERL" ? "ok 9\n" : "not ok 9 \n"; |
21 | print "\u\LpE\Q#X#\ER\EL" eq "Pe\\#x\\#rL" ? "ok 10\n" : "not ok 10 \n"; |
22 | print "\l\UPe\Q!x!\Er\El" eq "pE\\!X\\!Rl" ? "ok 11\n" : "not ok 11 \n"; |
23 | print "\Q\u\LpE.X.R\EL\E." eq "Pe\\.x\\.rL." ? "ok 12\n" : "not ok 12 \n"; |
24 | print "\Q\l\UPe*x*r\El\E*" eq "pE\\*X\\*Rl*" ? "ok 13\n" : "not ok 13 \n"; |
25 | print "\U\lPerl\E\E\E\E" eq "pERL" ? "ok 14\n" : "not ok 14 \n"; |
26 | print "\l\UPerl\E\E\E\E" eq "pERL" ? "ok 15\n" : "not ok 15 \n"; |