Consolidate shell script testcases without interpreter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15076 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/none/tests/scripts/Makefile.am b/none/tests/scripts/Makefile.am
index 8ff5b88..9fe986b 100644
--- a/none/tests/scripts/Makefile.am
+++ b/none/tests/scripts/Makefile.am
@@ -13,11 +13,15 @@
 	shell_badinterp shell_badinterp.vgtest shell_badinterp.stderr.exp \
 	shell_binaryfile shell_binaryfile.vgtest shell_binaryfile.stderr.exp \
 	shell_dir.vgtest shell_dir.stderr.exp \
+	shell_nointerp1 shell_nointerp1.vgtest shell_nointerp1.stderr.exp \
+	shell_nointerp1.stdout.exp \
+	shell_nointerp2 shell_nointerp2.vgtest shell_nointerp2.stderr.exp \
+	shell_nointerp2.stdout.exp \
+	shell_nointerp3 shell_nointerp3.vgtest shell_nointerp3.stderr.exp \
+	shell_nointerp3.stdout.exp \
 	shell_nonexec.vgtest shell_nonexec.stderr.exp \
 	shell_nosuchfile.vgtest shell_nosuchfile.stderr.exp \
 	shell_valid1 shell_valid1.vgtest shell_valid1.stderr.exp \
-	shell_valid2 shell_valid2.vgtest shell_valid2.stderr.exp \
-	shell_valid3 shell_valid3.vgtest shell_valid3.stderr.exp \
 	shell_valid4 shell_valid4.vgtest shell_valid4.stderr.exp \
 	shell_valid4.stdout.exp \
 	shell_zerolength shell_zerolength.vgtest shell_zerolength.stderr.exp \
diff --git a/none/tests/scripts/shell b/none/tests/scripts/shell
index 588a95d..dc0b8b1 100755
--- a/none/tests/scripts/shell
+++ b/none/tests/scripts/shell
@@ -31,10 +31,10 @@
 ./shell_valid1
 
 echo "Execute a valid script without a #! line"
-./shell_valid2
+./shell_nointerp1
 
 echo "Execute a valid script with #! but no interpname"
-./shell_valid3
+./shell_nointerp2
 
 echo "Execute a zero-length file"
 ./shell_zerolength
diff --git a/none/tests/scripts/shell.stdout.exp b/none/tests/scripts/shell.stdout.exp
index 14855a4..c3ff8a7 100644
--- a/none/tests/scripts/shell.stdout.exp
+++ b/none/tests/scripts/shell.stdout.exp
@@ -6,5 +6,7 @@
 Execute a non-existent file (2)
 Execute a valid script with a #! line
 Execute a valid script without a #! line
+tata
 Execute a valid script with #! but no interpname
+no space after #!
 Execute a zero-length file
diff --git a/none/tests/scripts/shell_valid2 b/none/tests/scripts/shell_nointerp1
similarity index 82%
rename from none/tests/scripts/shell_valid2
rename to none/tests/scripts/shell_nointerp1
index f00fc86..4364322 100755
--- a/none/tests/scripts/shell_valid2
+++ b/none/tests/scripts/shell_nointerp1
@@ -2,5 +2,5 @@
 #
 # This is a valid script without a #! line 
 
-true
+echo tata
 
diff --git a/none/tests/scripts/shell_valid2.stderr.exp b/none/tests/scripts/shell_nointerp1.stderr.exp
similarity index 100%
copy from none/tests/scripts/shell_valid2.stderr.exp
copy to none/tests/scripts/shell_nointerp1.stderr.exp
diff --git a/none/tests/scripts/shell_nointerp1.vgtest b/none/tests/scripts/shell_nointerp1.vgtest
new file mode 100644
index 0000000..5a5c5c5
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp1.vgtest
@@ -0,0 +1,2 @@
+prog: shell_nointerp1
+vgopts: -q
diff --git a/none/tests/scripts/shell_nointerp2 b/none/tests/scripts/shell_nointerp2
new file mode 100755
index 0000000..64ac35e
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp2
@@ -0,0 +1,2 @@
+#!
+echo 'no space after #!'
diff --git a/none/tests/scripts/shell_valid2.stderr.exp b/none/tests/scripts/shell_nointerp2.stderr.exp
similarity index 100%
rename from none/tests/scripts/shell_valid2.stderr.exp
rename to none/tests/scripts/shell_nointerp2.stderr.exp
diff --git a/none/tests/scripts/shell_nointerp2.stdout.exp b/none/tests/scripts/shell_nointerp2.stdout.exp
new file mode 100644
index 0000000..2283011
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp2.stdout.exp
@@ -0,0 +1 @@
+no space after #!
diff --git a/none/tests/scripts/shell_nointerp2.vgtest b/none/tests/scripts/shell_nointerp2.vgtest
new file mode 100644
index 0000000..346e347
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp2.vgtest
@@ -0,0 +1,2 @@
+prog: shell_nointerp2
+vgopts: -q
diff --git a/none/tests/scripts/shell_nointerp3 b/none/tests/scripts/shell_nointerp3
new file mode 100755
index 0000000..9104705
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp3
@@ -0,0 +1,2 @@
+#!  
+echo 'there is a space after the #!'
diff --git a/none/tests/scripts/shell_valid3.stderr.exp b/none/tests/scripts/shell_nointerp3.stderr.exp
similarity index 100%
rename from none/tests/scripts/shell_valid3.stderr.exp
rename to none/tests/scripts/shell_nointerp3.stderr.exp
diff --git a/none/tests/scripts/shell_nointerp3.stdout.exp b/none/tests/scripts/shell_nointerp3.stdout.exp
new file mode 100644
index 0000000..2d5f075
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp3.stdout.exp
@@ -0,0 +1 @@
+there is a space after the #!
diff --git a/none/tests/scripts/shell_nointerp3.vgtest b/none/tests/scripts/shell_nointerp3.vgtest
new file mode 100644
index 0000000..7ef940b
--- /dev/null
+++ b/none/tests/scripts/shell_nointerp3.vgtest
@@ -0,0 +1,2 @@
+prog: shell_nointerp3
+vgopts: -q
diff --git a/none/tests/scripts/shell_valid2.vgtest b/none/tests/scripts/shell_valid2.vgtest
deleted file mode 100644
index d85e93e..0000000
--- a/none/tests/scripts/shell_valid2.vgtest
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: shell_valid2
-vgopts: -q
diff --git a/none/tests/scripts/shell_valid3 b/none/tests/scripts/shell_valid3
deleted file mode 100755
index 7c3cb3e..0000000
--- a/none/tests/scripts/shell_valid3
+++ /dev/null
@@ -1,5 +0,0 @@
-#!      
-#
-# The interpreter name is missing in this file.
-
-true
diff --git a/none/tests/scripts/shell_valid3.vgtest b/none/tests/scripts/shell_valid3.vgtest
deleted file mode 100644
index 901a393..0000000
--- a/none/tests/scripts/shell_valid3.vgtest
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: shell_valid3
-vgopts: -q