diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2011-10-06 13:53:16 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2011-10-06 13:53:16 +0100 |
commit | 89bc67f9d4b29f52cfb8ef367f2fb8d0712fd73d (patch) | |
tree | 7712dd0dd63ac6b91e804d0761acc4cf9b8c0a78 | |
parent | 712c7e7771de093576175f31eddcbd7f6b5922b9 (diff) | |
download | tbdiff-89bc67f9d4b29f52cfb8ef367f2fb8d0712fd73d.tar.gz |
Testing readme now doesn't refer to test scripts as bash scripts
-rw-r--r-- | README.testing | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/README.testing b/README.testing index ce67880..0dd1b33 100644 --- a/README.testing +++ b/README.testing @@ -22,7 +22,7 @@ Anatomy of a unit test Each test needs to copy the following boilerplate: - #!/bin/bash + #!/bin/sh TEST_ID="01" TEST_NAME="My unit test" @@ -33,15 +33,15 @@ Each test needs to copy the following boilerplate: . ./test_lib.sh ############# Test specific code ############ - function setup { + setup () { } - function check_results { + check_results () { } ############################################# main $@ -Test lib is a bash function library that sets up the environment for the test. +Test lib is a shell function library that sets up the environment for the test. To create a test, we have two main variables $ORIGIN and $TARGET which are the origin and target directories of the diff respectively. The setup function should populate the origin and the target directories for the diff test. @@ -52,14 +52,14 @@ contents and metadata (mtime, ownership and permissions): ORG_FILE=$ORIGIN/b.txt TGT_FILE=$TARGET/b.txt - function setup { + setup () { echo 1 > $ORG_FILE && \ echo 2 > $TGT_FILE && \ chown :cdrom $TGT_FILE && \ chmod 707 $TGT_FILE } - function check_results { + check_results () { check_content $ORG_FILE "2" && \ check_perm $ORG_FILE 707 && \ check_group $ORG_FILE cdrom && \ |