diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-18 04:44:28 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-18 04:44:28 +0000 |
commit | 9442cb0ec25041ea5b061c40868e0a3c8bfbb2ab (patch) | |
tree | 5daab49f90f4f56ab0c78b3f182bbbf7c9c2bc15 /t | |
parent | dc333d646a9558aeba3e1eead33465178e854942 (diff) | |
download | perl-9442cb0ec25041ea5b061c40868e0a3c8bfbb2ab.tar.gz |
make /\S/ match the same things /[\S]/ matches; likewise for
\D (from Rick Delaney <rick@consumercontact.com>)
p4raw-id: //depot/perl@5126
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 9f685502f2..9dc3ac7566 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4,7 +4,7 @@ # the format supported by op/regexp.t. If you want to add a test # that does fit that format, add it to op/re_tests, not here. -print "1..195\n"; +print "1..207\n"; BEGIN { chdir 't' if -d 't'; @@ -905,3 +905,51 @@ $text = "abc dbf"; print "ok $test\n"; $test++; +@a = map chr,0..255; +print "not " if grep(/\S/,@a) != grep(/[^\s]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\S/,@a) != grep(/[\S]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\s/,@a) != grep(/[^\S]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\s/,@a) != grep(/[\s]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\D/,@a) != grep(/[^\d]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\D/,@a) != grep(/[\D]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\d/,@a) != grep(/[^\D]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\d/,@a) != grep(/[\d]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\W/,@a) != grep(/[^\w]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\W/,@a) != grep(/[\W]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\w/,@a) != grep(/[^\W]/,@a); +print "ok $test\n"; +$test++; + +print "not " if grep(/\w/,@a) != grep(/[\w]/,@a); +print "ok $test\n"; +$test++; |