summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-12-07 20:03:26 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-12-08 19:52:53 -0500
commita152d1795485b80908cdcd15d0b1d181b4a0150d (patch)
treea6b4c5f5e671e92b96363a03fd5055b7c91e349d /tests.sh
parent2abb551664cddd24a06975f589ccda31b49e1f9d (diff)
downloadbfs-a152d1795485b80908cdcd15d0b1d181b4a0150d.tar.xz
tests: Fix failure when /tmp is a symlink.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests.sh b/tests.sh
index 1ee068f..b880612 100755
--- a/tests.sh
+++ b/tests.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -o physical
+
# The temporary directory that will hold our test data
TMP="$(mktemp -d "${TMPDIR:-/tmp}"/bfs.XXXXXXXXXX)"
chown "$(id -u)":"$(id -g)" "$TMP"
@@ -377,7 +379,8 @@ function test_0063() {
}
function test_0064() {
- local OFFSET="$((${#TMP} + 2))"
+ local TMP_REAL="$(cd "$TMP" && pwd)"
+ local OFFSET="$((${#TMP_REAL} + 2))"
bfs_diff basic -execdir bash -c "pwd | cut -b$OFFSET-" ';'
}