summaryrefslogtreecommitdiff
path: root/lib/subunit
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-12-02 10:20:59 +0100
committerBjoern Jacke <bj@sernet.de>2010-12-02 10:36:06 +0100
commiteeade1596df7bd52fab3b3a4b39266f39ffa6fb1 (patch)
tree3d8e8220321c0bc7d745a5e9b40be5ef2eec8cf4 /lib/subunit
parente8f9ee64a71d788a8ed1e1d7d5715f248c4fa107 (diff)
downloadsamba-eeade1596df7bd52fab3b3a4b39266f39ffa6fb1.tar.gz
samba-eeade1596df7bd52fab3b3a4b39266f39ffa6fb1.tar.bz2
samba-eeade1596df7bd52fab3b3a4b39266f39ffa6fb1.zip
tests: avoid bash in shebang and fix wrong "==" in test
Diffstat (limited to 'lib/subunit')
-rwxr-xr-xlib/subunit/shell/tests/test_function_output.sh10
-rwxr-xr-xlib/subunit/shell/tests/test_source_library.sh14
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/subunit/shell/tests/test_function_output.sh b/lib/subunit/shell/tests/test_function_output.sh
index b78eee6946..6e500cff5c 100755
--- a/lib/subunit/shell/tests/test_function_output.sh
+++ b/lib/subunit/shell/tests/test_function_output.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# subunit shell bindings.
# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
#
@@ -29,7 +29,7 @@
echo 'test: subunit_start_test output'
func_output=$(subunit_start_test "foo bar")
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xtest: foo bar" ]; then
+if [ $func_status -eq 0 -a "x$func_output" = "xtest: foo bar" ]; then
echo 'success: subunit_start_test output'
else
echo 'failure: subunit_start_test output ['
@@ -42,7 +42,7 @@ fi
subunit_start_test "subunit_pass_test output"
func_output=$(subunit_pass_test "foo bar")
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
+if [ $func_status -eq 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
subunit_pass_test "subunit_pass_test output"
else
echo 'failure: subunit_pass_test output ['
@@ -60,7 +60,7 @@ here
END
)
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xfailure: foo bar [
+if [ $func_status -eq 0 -a "x$func_output" = "xfailure: foo bar [
something
wrong
here
@@ -82,7 +82,7 @@ here
END
)
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xerror: foo bar [
+if [ $func_status -eq 0 -a "x$func_output" = "xerror: foo bar [
something
died
here
diff --git a/lib/subunit/shell/tests/test_source_library.sh b/lib/subunit/shell/tests/test_source_library.sh
index 699f1281bc..3ef6ffeb36 100755
--- a/lib/subunit/shell/tests/test_source_library.sh
+++ b/lib/subunit/shell/tests/test_source_library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# subunit shell bindings.
# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
#
@@ -24,7 +24,7 @@
echo 'test: shell bindings can be sourced'
# if any output occurs, this has failed to source cleanly
source_output=$(. ${SHELL_SHARE}subunit.sh 2>&1)
-if [ $? == 0 -a "x$source_output" = "x" ]; then
+if [ $? -eq 0 -a "x$source_output" = "x" ]; then
echo 'success: shell bindings can be sourced'
else
echo 'failure: shell bindings can be sourced ['
@@ -40,7 +40,7 @@ fi
echo 'test: subunit_start_test exists'
found_type=$(type -t subunit_start_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_start_test exists'
else
echo 'failure: subunit_start_test exists ['
@@ -54,7 +54,7 @@ fi
echo 'test: subunit_pass_test exists'
found_type=$(type -t subunit_pass_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_pass_test exists'
else
echo 'failure: subunit_pass_test exists ['
@@ -68,7 +68,7 @@ fi
echo 'test: subunit_fail_test exists'
found_type=$(type -t subunit_fail_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_fail_test exists'
else
echo 'failure: subunit_fail_test exists ['
@@ -82,7 +82,7 @@ fi
echo 'test: subunit_error_test exists'
found_type=$(type -t subunit_error_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_error_test exists'
else
echo 'failure: subunit_error_test exists ['
@@ -96,7 +96,7 @@ fi
echo 'test: subunit_skip_test exists'
found_type=$(type -t subunit_skip_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_skip_test exists'
else
echo 'failure: subunit_skip_test exists ['