diff options
Diffstat (limited to 'contrib/perl5/t/pragma/warn-1global')
-rw-r--r-- | contrib/perl5/t/pragma/warn-1global | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/perl5/t/pragma/warn-1global b/contrib/perl5/t/pragma/warn-1global index 07b5bc8..a7ca607 100644 --- a/contrib/perl5/t/pragma/warn-1global +++ b/contrib/perl5/t/pragma/warn-1global @@ -12,12 +12,14 @@ EXPECT $a =+ 3 ; EXPECT Reversed += operator at - line 3. +Name "main::a" used only once: possible typo at - line 3. ######## #! perl -w # warnable code, warnings enabled via #! line $a =+ 3 ; EXPECT Reversed += operator at - line 3. +Name "main::a" used only once: possible typo at - line 3. ######## # warnable code, warnings enabled via compile time $^W @@ -25,6 +27,7 @@ BEGIN { $^W = 1 } $a =+ 3 ; EXPECT Reversed += operator at - line 4. +Name "main::a" used only once: possible typo at - line 4. ######## # compile-time warnable code, warnings enabled via runtime $^W @@ -149,3 +152,8 @@ Use of uninitialized value at - line 5. -e undef EXPECT Use of uninitialized value at - line 2. +######## +BEGIN { $^W = 1 } +for (@{[0]}) { "$_" } # check warning isn't duplicated +EXPECT +Useless use of string in void context at - line 2. |