summaryrefslogtreecommitdiff
path: root/yarns/tbdiff.shell-lib
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2013-10-22 12:40:30 +0100
committerBen Brown <ben.brown@codethink.co.uk>2013-10-24 12:32:54 +0100
commit085e620e5f5d0f85a8012785c89604ffa1a598d4 (patch)
tree9ca3801b8fc6c016b08bf7c00fe5b6f957024d9b /yarns/tbdiff.shell-lib
parent2fdfa3149be9ae43fb23cda6459e841fb3a90698 (diff)
downloadtbdiff-085e620e5f5d0f85a8012785c89604ffa1a598d4.tar.gz
Add new Yarn based test suite
This introduces a yarn which demonstrates testing tbdiff. Also included is a shell library to assist with writing yarn based tests, a script for running the test suite and a simple README for executing the tests.
Diffstat (limited to 'yarns/tbdiff.shell-lib')
-rw-r--r--yarns/tbdiff.shell-lib14
1 files changed, 14 insertions, 0 deletions
diff --git a/yarns/tbdiff.shell-lib b/yarns/tbdiff.shell-lib
new file mode 100644
index 0000000..658efe6
--- /dev/null
+++ b/yarns/tbdiff.shell-lib
@@ -0,0 +1,14 @@
+# Shell library for tbdiff yarns.
+#
+# The shell functions in this library are meant to make writing IMPLEMENTS
+# sections for yarn scenario tests easier.
+
+# Currently, yarn isn't setting $SRCDIR to point at the project source
+# directory. We simulate this here.
+
+{
+ set +u
+ if [ -z "$SRCDIR" ]; then
+ export SRCDIR="$(pwd)"
+ fi
+}