From 1cd162434fb72c9050602703a76677707346a649 Mon Sep 17 00:00:00 2001 From: Matthew Rothenberg Date: Thu, 16 Oct 2014 16:10:52 -0400 Subject: [PATCH] Make sure we have physical path back from mktemp Darwin actually symlinks /var inside /private, but mktemp reports back the logical pathat time of file creation. So make sure we always get the full physical path to be absolutely certain when doing comparisons later, because thats how the Ruby status_shortcuts.rb script is going to obtain them. --- test/lib/git/shell_shortcuts_test.sh | 8 ++++++++ test/lib/git/status_shortcuts_test.sh | 1 + 2 files changed, 9 insertions(+) diff --git a/test/lib/git/shell_shortcuts_test.sh b/test/lib/git/shell_shortcuts_test.sh index 834f03b..2ace560 100755 --- a/test/lib/git/shell_shortcuts_test.sh +++ b/test/lib/git/shell_shortcuts_test.sh @@ -71,7 +71,15 @@ test_ls_with_file_shortcuts() { export git_env_char="e" TEST_DIR=$(mktemp -d -t scm_breeze.XXXXXXXXXX) + + # Darwin actually symlinks /var inside /private, but mktemp reports back the + # logical pathat time of file creation. So make sure we always get the + # full physical path to be absolutely certain when doing comparisons later, + # because thats how the Ruby status_shortcuts.rb script is going to obtain + # them. cd $TEST_DIR + TEST_DIR=`pwd -P` + touch 'test file' 'test_file' mkdir -p "a [b]" 'a "b"' "a 'b'" touch "a \"b\"/c" diff --git a/test/lib/git/status_shortcuts_test.sh b/test/lib/git/status_shortcuts_test.sh index aa86d2e..818183f 100755 --- a/test/lib/git/status_shortcuts_test.sh +++ b/test/lib/git/status_shortcuts_test.sh @@ -29,6 +29,7 @@ oneTimeSetUp() { export ga_auto_remove="yes" testRepo=$(mktemp -d -t scm_breeze.XXXXXXXXXX) + testRepo=`cd $testRepo && pwd -P` } oneTimeTearDown() {