diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-12-07 20:03:26 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-12-08 19:52:53 -0500 |
commit | a152d1795485b80908cdcd15d0b1d181b4a0150d (patch) | |
tree | a6b4c5f5e671e92b96363a03fd5055b7c91e349d /tests.sh | |
parent | 2abb551664cddd24a06975f589ccda31b49e1f9d (diff) | |
download | bfs-a152d1795485b80908cdcd15d0b1d181b4a0150d.tar.xz |
tests: Fix failure when /tmp is a symlink.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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-" ';' } |