From 831d57a0f52c4c1bb8b9561a82b3006474595c84 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 8 Jan 2013 10:47:37 -0500 Subject: remote-hg: Fix biridectionality -> bidirectionality typos Signed-off-by: W. Trevor King Signed-off-by: Junio C Hamano diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 016cdad..c700600 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -31,7 +31,7 @@ import urllib # hg: # Emulate hg-git. # Only hg bookmarks are exported as git branches. -# Commits are modified to preserve hg information and allow biridectionality. +# Commits are modified to preserve hg information and allow bidirectionality. # NAME_RE = re.compile('^([^<>]+)') diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh index a94eb28..1d61982 100755 --- a/contrib/remote-helpers/test-hg-bidi.sh +++ b/contrib/remote-helpers/test-hg-bidi.sh @@ -6,7 +6,7 @@ # https://bitbucket.org/durin42/hg-git/src # -test_description='Test biridectionality of remote-hg' +test_description='Test bidirectionality of remote-hg' . ./test-lib.sh -- cgit v0.10.2-6-g49f6 From 283b365e4521082ab37d93762bb2f049dc38bee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 8 Jan 2013 21:23:01 +0100 Subject: t1402: work around shell quoting issue on NetBSD The test fails for me on NetBSD 6.0.1 and reports: ok 1 - ref name '' is invalid ok 2 - ref name '/' is invalid ok 3 - ref name '/' is invalid with options --allow-onelevel ok 4 - ref name '/' is invalid with options --normalize error: bug in the test script: not 2 or 3 parameters to test-expect-success The alleged bug is in this line: invalid_ref NOT_MINGW '/' '--allow-onelevel --normalize' invalid_ref() constructs a test case description using its last argument, but the shell seems to split it up into two pieces if it contains a space. Minimal test case: # on NetBSD with /bin/sh $ a() { echo $#-$1-$2; } $ t="x"; a "${t:+$t}" 1-x- $ t="x y"; a "${t:+$t}" 2-x-y $ t="x y"; a "${t:+x y}" 1-x y- # and with bash $ t="x y"; a "${t:+$t}" 1-x y- $ t="x y"; a "${t:+x y}" 1-x y- This may be a bug in the shell, but here's a simple workaround: Construct the description string first and store it in a variable, and then use that to call test_expect_success(). Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh index 1ae4d87..1a5a5f3 100755 --- a/t/t1402-check-ref-format.sh +++ b/t/t1402-check-ref-format.sh @@ -11,7 +11,8 @@ valid_ref() { prereq=$1 shift esac - test_expect_success $prereq "ref name '$1' is valid${2:+ with options $2}" " + desc="ref name '$1' is valid${2:+ with options $2}" + test_expect_success $prereq "$desc" " git check-ref-format $2 '$1' " } @@ -22,7 +23,8 @@ invalid_ref() { prereq=$1 shift esac - test_expect_success $prereq "ref name '$1' is invalid${2:+ with options $2}" " + desc="ref name '$1' is invalid${2:+ with options $2}" + test_expect_success $prereq "$desc" " test_must_fail git check-ref-format $2 '$1' " } -- cgit v0.10.2-6-g49f6