In perl.git, the branch rgs/nomagicopen has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/320390b4600ce9a942b3e63b6906d03a56da5042?hp=0d36b5a5c2536f7ed29e6e66ee888d076f93f012>

- Log -----------------------------------------------------------------
commit 320390b4600ce9a942b3e63b6906d03a56da5042
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Tue Sep 30 01:19:55 2014 +0200

    Add tests for empty strings in @ARGV
    
    which should be refused, since no file name should be empty.
    (Suggested by Richard Soderberg)
-----------------------------------------------------------------------

Summary of changes:
 t/io/argv.t | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index 944abd2..b3825bb 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require "./test.pl"; }
 
-plan(tests => 32);
+plan(tests => 34);
 
 my ($devnull, $no_devnull);
 
@@ -184,6 +184,21 @@ $x = runperl(
 );
 is($x, "Can't open -: No such file or directory at -e line 1.\n", '<<>> does 
not treat - as STDIN');
 
+{
+    # tests for an empty string in @ARGV
+    $x = runperl(
+        prog   => 'push @ARGV,q//;print while <>',
+        stderr => 1,
+    );
+    is($x, "Can't open : No such file or directory at -e line 1.\n", '<<>> 
does not treat - as STDIN');
+
+    $x = runperl(
+        prog   => 'push @ARGV,q//;print while <<>>',
+        stderr => 1,
+    );
+    is($x, "Can't open : No such file or directory at -e line 1.\n", '<<>> 
does not treat - as STDIN');
+}
+
 SKIP: {
     skip('no echo', 1) unless -x '/bin/echo';
 

--
Perl5 Master Repository

Reply via email to