summaryrefslogtreecommitdiff
path: root/README.testing
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2011-10-06 13:53:16 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2011-10-06 13:53:16 +0100
commit89bc67f9d4b29f52cfb8ef367f2fb8d0712fd73d (patch)
tree7712dd0dd63ac6b91e804d0761acc4cf9b8c0a78 /README.testing
parent712c7e7771de093576175f31eddcbd7f6b5922b9 (diff)
downloadtbdiff-89bc67f9d4b29f52cfb8ef367f2fb8d0712fd73d.tar.gz
Testing readme now doesn't refer to test scripts as bash scripts
Diffstat (limited to 'README.testing')
-rw-r--r--README.testing12
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 && \