separate has_shebang_line tests
This commit is contained in:
1
tests/Internals/bash
Executable file
1
tests/Internals/bash
Executable file
@@ -0,0 +1 @@
|
||||
run '!#/bin/bash'
|
||||
1
tests/Internals/empty
Executable file
1
tests/Internals/empty
Executable file
@@ -0,0 +1 @@
|
||||
! run ''
|
||||
5
tests/Internals/empty-line
Executable file
5
tests/Internals/empty-line
Executable file
@@ -0,0 +1,5 @@
|
||||
! run '
|
||||
|
||||
|
||||
|
||||
'
|
||||
1
tests/Internals/env
Executable file
1
tests/Internals/env
Executable file
@@ -0,0 +1 @@
|
||||
run '!#/usr/bin/env true'
|
||||
@@ -1,20 +0,0 @@
|
||||
TESTING_URCHIN_INTERNALS=true . ../../urchin
|
||||
|
||||
echo '!#/bin/sh' > $tmp
|
||||
! has_shebang_line $tmp
|
||||
|
||||
echo '!#/bin/bash' > $tmp
|
||||
has_shebang_line $tmp
|
||||
|
||||
echo '!#/usr/bin/env true' > $tmp
|
||||
has_shebang_line $tmp
|
||||
|
||||
echo > $tmp
|
||||
! has_shebang_line $tmp
|
||||
|
||||
echo '
|
||||
|
||||
|
||||
|
||||
' > $tmp
|
||||
! has_shebang_line $tmp
|
||||
@@ -1 +1,7 @@
|
||||
export tmp=$(mktemp)
|
||||
|
||||
run() {
|
||||
TESTING_URCHIN_INTERNALS=true . ../../urchin
|
||||
echo "$1" > $tmp
|
||||
has_shebang_line $tmp
|
||||
}
|
||||
|
||||
1
tests/Internals/sh
Executable file
1
tests/Internals/sh
Executable file
@@ -0,0 +1 @@
|
||||
! run '!#/bin/sh'
|
||||
Reference in New Issue
Block a user