summaryrefslogtreecommitdiff
path: root/tests/setup-sourced
diff options
context:
space:
mode:
authorDr. Tilmann Bubeck <t.bubeck@reinform.de>2013-10-06 14:16:59 +0200
committerDr. Tilmann Bubeck <t.bubeck@reinform.de>2013-10-06 14:16:59 +0200
commit10cbe2ed2a96582e7ee9fa5cfe6f8f69a3a4e4d4 (patch)
tree249eb52181f60840a91e36ea7e067c7f91f7d66b /tests/setup-sourced
parent3be53072f8252962c6df740e64e897b970ae0349 (diff)
downloadxorg-app-xauth-10cbe2ed2a96582e7ee9fa5cfe6f8f69a3a4e4d4.tar.gz
Added black box tests for basic functionality started with "make check".
Diffstat (limited to 'tests/setup-sourced')
-rw-r--r--tests/setup-sourced26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/setup-sourced b/tests/setup-sourced
new file mode 100644
index 0000000..2ed1a6b
--- /dev/null
+++ b/tests/setup-sourced
@@ -0,0 +1,26 @@
+#
+# This script gets sourced by every test to setup a common environment.
+#
+
+# Force all output to be standard english
+export LANG=C
+
+# Define the name of the authority file, which we use during test.
+export XAUTHORITY=${DATADIR:-/tmp}/.Xauthority
+
+# Start a new authority file
+rm -f $XAUTHORITY ; touch $XAUTHORITY
+
+function xauth()
+{
+ echo "> xauth" "$@"
+ ../xauth "$@"
+ echo " exits with $?"
+}
+
+function xauth_silent()
+{
+ echo "> xauth" "some silent commands which should not be logged..."
+ ../xauth "$@"
+ echo " exits with $?"
+}