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.
This commit is contained in:
Matthew Rothenberg
2014-10-16 16:10:52 -04:00
parent b2d86a16b2
commit 1cd162434f
2 changed files with 9 additions and 0 deletions

View File

@@ -71,7 +71,15 @@ test_ls_with_file_shortcuts() {
export git_env_char="e" export git_env_char="e"
TEST_DIR=$(mktemp -d -t scm_breeze.XXXXXXXXXX) 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 cd $TEST_DIR
TEST_DIR=`pwd -P`
touch 'test file' 'test_file' touch 'test file' 'test_file'
mkdir -p "a [b]" 'a "b"' "a 'b'" mkdir -p "a [b]" 'a "b"' "a 'b'"
touch "a \"b\"/c" touch "a \"b\"/c"

View File

@@ -29,6 +29,7 @@ oneTimeSetUp() {
export ga_auto_remove="yes" export ga_auto_remove="yes"
testRepo=$(mktemp -d -t scm_breeze.XXXXXXXXXX) testRepo=$(mktemp -d -t scm_breeze.XXXXXXXXXX)
testRepo=`cd $testRepo && pwd -P`
} }
oneTimeTearDown() { oneTimeTearDown() {