From 06c2e26804f7a3f9ad0f37ec128f92bbdc2a1ce4 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Tue, 23 Oct 2012 12:30:25 +1300 Subject: [PATCH] Added test for ls with subdirectory --- test/lib/git/shell_shortcuts_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/lib/git/shell_shortcuts_test.sh b/test/lib/git/shell_shortcuts_test.sh index 1c1f5d7..a1433a2 100755 --- a/test/lib/git/shell_shortcuts_test.sh +++ b/test/lib/git/shell_shortcuts_test.sh @@ -70,6 +70,7 @@ test_ls_with_file_shortcuts() { cd $TEST_DIR touch 'test file' 'test_file' mkdir -p "a [b]" 'a "b"' "a 'b'" + touch "a \"b\"/c" # Run command in shell, load output from temp file into variable # (This is needed so that env variables are exported in the current shell) @@ -90,6 +91,10 @@ test_ls_with_file_shortcuts() { assertEquals "$TEST_DIR/a [b]" "$e3" assertEquals "$TEST_DIR/test file" "$e4" assertEquals "$TEST_DIR/test_file" "$e5" + + # Test ls with subdirectory + ls_output=$(ls_with_file_shortcuts "a \"b\"" | strip_colors) + assertIncludes "$ls_output" '[1] c' F } # load and run shUnit2