diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-05-26 18:26:40 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-05-26 18:26:40 +0200 |
commit | 9a8a8154e760831a634ef0df130347674ea26459 (patch) | |
tree | c6c0f8a79b6d6ae72e7320d296fb629abf238677 | |
parent | 5a33cafb3e9fc5707648ad1389fba19eefaf2247 (diff) | |
parent | 933981904d595f4bab92e904b4d426ca07c8ccfc (diff) | |
download | perl-9a8a8154e760831a634ef0df130347674ea26459.tar.gz |
Merge branch 'blead' of camel:/gitroot/perl into blead
-rw-r--r-- | t/lib/warnings/9uninit | 78 |
1 files changed, 66 insertions, 12 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 50e7f503af..58db2b2b5a 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -448,25 +448,79 @@ Use of uninitialized value $g1 in exists at - line 8. use warnings 'uninitialized'; my ($m1, $m2); my ($v, @a); +my ($t, $u) = (1, 1); local $.; -@ma = (1 .. 2); +@ma = (1 .. 2); +@ma = ($t .. 2); @ma = ($m1 .. 2); -@ma = (1 .. $m2); -@ma = ($m1 .. $m2); +@ma = (1 .. $u); +@ma = (1 .. $m2); + +@ma = (1 ... 2); +@ma = ($t ... 2); +@ma = ($m1 ... 2); +@ma = (1 ... $u); +@ma = (1 ... $m2); -$v = (1 .. 2); +$v = (1 .. 2); +$v = ($t .. 2); $v = ($m1 .. 2); -$v = (1 .. $m2); +$v = (1 .. $u); +$v = (1 .. $m2); + +$v = (1 ... 2); +$v = ($t ... 2); +$v = ($m1 ... 2); +$v = (1 ... $u); +$v = (1 ... $m2); +EXPECT +Use of uninitialized value $m1 in range (or flop) at - line 10. +Use of uninitialized value $m2 in range (or flop) at - line 12. +Use of uninitialized value $m1 in range (or flop) at - line 16. +Use of uninitialized value $m2 in range (or flop) at - line 18. +Use of uninitialized value $. in range (or flip) at - line 20. +Use of uninitialized value $. in range (or flop) at - line 21. +Use of uninitialized value $. in range (or flip) at - line 23. +Use of uninitialized value $. in range (or flip) at - line 24. +Use of uninitialized value $. in range (or flip) at - line 26. +Use of uninitialized value $. in range (or flip) at - line 29. +Use of uninitialized value $. in range (or flip) at - line 30. +######## +use warnings 'uninitialized'; +my ($m1, $m2); +my ($v, @a); +my ($t, $u) = (1, 1); + +@ma = ($t .. $u); +@ma = ($m1 .. $u); +@ma = ($t .. $m2); +@ma = ($m1 .. $m2); + +@ma = ($t ... $u); +@ma = ($m1 ... $u); +@ma = ($t ... $m2); +@ma = ($m1 ... $m2); + +$v = ($t .. $u); +$v = ($m1 .. $u); +$v = ($t .. $m2); $v = ($m1 .. $m2); -EXPECT -Use of uninitialized value $m1 in range (or flop) at - line 8. -Use of uninitialized value $m2 in range (or flop) at - line 9. -Use of uninitialized value in range (or flop) at - line 10. -Use of uninitialized value in range (or flop) at - line 10. -Use of uninitialized value $. in range (or flip) at - line 12. -Use of uninitialized value $. in range (or flip) at - line 14. + +$v = ($t ... $u); +$v = ($m1 ... $u); +$v = ($t ... $m2); +$v = ($m1 ... $m2); +EXPECT +Use of uninitialized value $m1 in range (or flop) at - line 7. +Use of uninitialized value $m2 in range (or flop) at - line 8. +Use of uninitialized value in range (or flop) at - line 9. +Use of uninitialized value in range (or flop) at - line 9. +Use of uninitialized value $m1 in range (or flop) at - line 12. +Use of uninitialized value $m2 in range (or flop) at - line 13. +Use of uninitialized value in range (or flop) at - line 14. +Use of uninitialized value in range (or flop) at - line 14. ######## use warnings 'uninitialized'; my ($m1, $v); |