-#!/bin/bash
+#!/bin/sh
# subunit shell bindings.
# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
#
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 ['
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 ['
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
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
-#!/bin/bash
+#!/bin/sh
# subunit shell bindings.
# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
#
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 ['
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 ['
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 ['
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 ['
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 ['
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 ['