From a152d1795485b80908cdcd15d0b1d181b4a0150d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 7 Dec 2016 20:03:26 -0500 Subject: tests: Fix failure when /tmp is a symlink. --- tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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-" ';' } -- cgit v1.2.3