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

[PATCH]: cogito testsuite: use git-symbolic-ref

From
PRPavel Roskin <proski@gnu.org>
Date
Nov 15, 2005, 01:13 UTC
Message-ID
<1132017180.24084.39.camel@dv>

cogito testsuite fails if git is compiled with USE_SYMLINK_HEAD=0. To fix it, use git-symbolic-ref instead of readlink.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/t/t9300-seek.sh b/t/t9300-seek.sh
index d3fed11..a6f3a65 100755
--- a/t/t9300-seek.sh
+++ b/t/t9300-seek.sh
@@ -30,7 +30,7 @@ test_expect_success 'seeking to the firs
 test_expect_success 'we should have .git/head-name == master' \
 	"[ $(cat .git/head-name) = master ]"
 test_expect_success 'current branch should be cg-seek-point' \
-	"[ $(basename $(readlink .git/HEAD)) = cg-seek-point ]"
+	"[ $(basename $(git-symbolic-ref HEAD)) = cg-seek-point ]"
 test_expect_success 'current commit should be commit1' \
 	"[ $(cg-object-id -c) = $commit1 ]"
 
@@ -47,14 +47,16 @@ test_expect_success 'identical should be
 test_expect_success 'seeking to the second commit' \
 	"cg-seek $commit2"
 test_expect_success 'we should not unseeked properly' \
-	"([ -e .git/head-name ] && [ $(basename $(readlink .git/HEAD)) = cg-seek-point ])"
+	"([ -e .git/head-name ] &&
+	 [ $(basename $(git-symbolic-ref HEAD)) = cg-seek-point ])"
 test_expect_success 'current commit should be commit2' \
 	"[ $(cg-object-id -c) = $commit2 ]"
 
 test_expect_success 'seeking to the last (well, still second) commit' \
 	"cg-seek master"
 test_expect_success 'we should be unseeked properly' \
-	"([ ! -e .git/head-name ] && [ $(basename $(readlink .git/HEAD)) = master ])"
+	"([ ! -e .git/head-name ] &&
+	 [ $(basename $(git-symbolic-ref HEAD)) = master ])"
 test_expect_success 'current commit should be commit2' \
 	"[ $(cg-object-id -c) = $commit2 ]"
 
@@ -88,7 +90,8 @@ test_expect_success 'identical should be
 test_expect_success 'unseeking' \
 	"cg-seek"
 test_expect_success 'we should be unseeked properly' \
-	"([ ! -e .git/head-name ] && [ $(basename $(readlink .git/HEAD)) = master ])"
+	"([ ! -e .git/head-name ] &&
+	 [ $(basename $(git-symbolic-ref HEAD)) = master ])"
 test_expect_success 'current commit should be commit2' \
 	"[ $(cg-object-id -c) = $commit2 ]"
 
-- 
Regards,
Pavel Roskin
Message 1 of 1 in “: cogito testsuite: use git-symbolic-ref”
  1. : cogito testsuite: use git-symbolic-refPavel Roskin, Nov 15, 2005

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.