git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 04/16] t0050: Check whether git init detected symbolic link support correctly

From
Johannes Sixt <j6t@kdbg.org>
Date
Mar 21, 2009, 21:26 UTC
Message-ID
<64e61f2d173b0172d9dbaa9667486764224568fb.1237667830.git.j6t@kdbg.org>
In-Reply-To
<cover.1237667830.git.j6t@kdbg.org>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t0050-filesystem.sh |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index a449580..89282cc 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -9,7 +9,8 @@ aumlcdiar=`printf '\x61\xcc\x88'`
 
 case_insensitive=
 unibad=
-test_expect_success 'see if we expect ' '
+no_symlinks=
+test_expect_success 'see what we expect' '
 
 	test_case=test_expect_success
 	test_unicode=test_expect_success
@@ -31,13 +32,21 @@ test_expect_success 'see if we expect ' '
 		;;
 	*)	;;
 	esac &&
-	rm -fr junk
+	rm -fr junk &&
+	{
+		ln -s x y 2> /dev/null &&
+		test -h y 2> /dev/null ||
+		no_symlinks=1
+		rm -f y
+	}
 '
 
 test "$case_insensitive" &&
 	say "will test on a case insensitive filesystem"
 test "$unibad" &&
 	say "will test on a unicode corrupting filesystem"
+test "$no_symlinks" &&
+	say "will test on a filesystem lacking symbolic links"
 
 if test "$case_insensitive"
 then
@@ -53,6 +62,21 @@ test_expect_success "detection of case insensitive filesystem during repo init"
 '
 fi
 
+if test "$no_symlinks"
+then
+test_expect_success "detection of filesystem w/o symlink support during repo init" '
+
+	v=$(git config --bool core.symlinks) &&
+	test "$v" = false
+'
+else
+test_expect_success "detection of filesystem w/o symlink support during repo init" '
+
+	test_must_fail git config --bool core.symlinks ||
+	test "$(git config --bool core.symlinks)" = true
+'
+fi
+
 test_expect_success "setup case tests" '
 
 	git config core.ignorecase true &&
-- 
1.6.2.1.224.g2225f
Previous: Johannes SixtNext: Johannes Sixt
Message 5 of 23 in “Tests on Windows - main part”
  1. 00/16 Tests on Windows - main partJohannes Sixt, Mar 21, 2009
  2. 01/16 test-lib: Work around incompatible sort and find on WindowsJohannes Sixt, Mar 21, 2009
  3. 02/16 test-lib: Work around missing sum on WindowsJohannes Sixt, Mar 21, 2009
  4. 03/16 Tests on Windows: $(pwd) must return Windows-style pathsJohannes Sixt, Mar 21, 2009
  5. 04/16 t0050: Check whether git init detected symbolic link support correctlyJohannes Sixt, Mar 21, 2009
  6. 05/16 test-lib: Infrastructure to test and check for prerequisitesJohannes Sixt, Mar 21, 2009
  7. Junio C HamanoMar 21, 2009
  8. 06/16 t3600: Use test prerequisite tagsJohannes Sixt, Mar 21, 2009
  9. Junio C HamanoMar 21, 2009
  10. 07/16 Skip tests that fail if the executable bit is not handled by the filesystemJohannes Sixt, Mar 21, 2009
  11. 08/16 t5302: Use prerequisite tags to skip 64-bit offset testsJohannes Sixt, Mar 21, 2009
  12. 09/16 t9100, t9129: Use prerequisite tags for UTF-8 testsJohannes Sixt, Mar 21, 2009
  13. 10/16 Use prerequisite tags to skip tests that depend on symbolic linksJohannes Sixt, Mar 21, 2009
  14. 11/16 t0060: Fix tests on WindowsJohannes Sixt, Mar 21, 2009
  15. 12/16 Skip tests that require a filesystem that obeys POSIX permissionsJohannes Sixt, Mar 21, 2009
  16. 13/16 t3700: Skip a test with backslashes in pathspecJohannes Sixt, Mar 21, 2009
  17. Junio C HamanoMar 21, 2009
  18. Johannes SixtMar 22, 2009
  19. Junio C HamanoMar 22, 2009
  20. 14/16 Use prerequisites to skip tests that need unzipJohannes Sixt, Mar 21, 2009
  21. 15/16 t7004: Use prerequisite tags to skip tests that need gpgJohannes Sixt, Mar 21, 2009
  22. 16/16 t5503: GIT_DEBUG_SEND_PACK is not supported on MinGWJohannes Sixt, Mar 21, 2009
  23. Johannes SixtMar 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.