Skip to content

Commit

Permalink
Tests: Fix for non-Bash /bin/sh (#345)
Browse files Browse the repository at this point in the history
* tests: Fix Bashism in POSIX shell script testContext.sh

Symptom was:
> # /bin/dash ./tests/lcov/extract/testContext.sh
> ./tests/lcov/extract/testContext.sh: 3: [: die: unexpected operator
> [..]

Signed-off-by: Sebastian Pipping <[email protected]>

* tests: Add missing portable Bash shebang line to script mcdc.sh

Symptom was:
> ./mcdc.sh: 61: [[: not found
> ./mcdc.sh: 70: Syntax error: "(" unexpected (expecting "then")

---------

Signed-off-by: Sebastian Pipping <[email protected]>
  • Loading branch information
hartwork authored Dec 18, 2024
1 parent 7034a93 commit 07efdef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/lcov/extract/testContext.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

if [ 'die' == "$1" ] ; then
if [ 'die' = "$1" ] ; then
echo "dieing"
exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions tests/lcov/mcdc/mcdc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env bash
CLEAN_ONLY=0
COVER=

Expand Down

0 comments on commit 07efdef

Please sign in to comment.