git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Use testlib to skip t3300-funny-names
@ 2006-01-05 11:53 Alex Riesen
  2006-01-06 22:38 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Riesen @ 2006-01-05 11:53 UTC (permalink / raw)
  To: Junio C Hamano, git

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

The test cannot be run on cygwin anyway.
Corrected the error message to reflect the problem source.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

[-- Attachment #2: 0007-Use-testlib-to-skip-the-test-it-cannot-be-run-on-cygwin.txt --]
[-- Type: text/plain, Size: 1077 bytes --]

Subject: [PATCH] Use testlib to skip the test (it cannot be run on cygwin)

Correct the error message to reflect the problem source

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>


---

 t/t3300-funny-names.sh |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

721ca495bbbff1d387aa48ae401b7a14fb486ac0
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index 6a85d67..5d70594 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -9,11 +9,15 @@ This test tries pathnames with funny cha
 tree, index, and tree objects.
 '
 
-# since FAT/NTFS does not allow tabs in filenames, skip this test
-test "$(uname -o 2>/dev/null)" = Cygwin && exit 0
-
 . ./test-lib.sh
 
+# Since FAT/NTFS does not allow tabs in filenames, skip this test.
+# Windows also have unexplainable problems with names containing only spaces.
+if [ "$(uname -o 2>/dev/null)" = Cygwin ]; then
+    say 'FAT and NTFS on Windows do not allow tabs in filenames, test skipped'
+    test_done
+fi
+
 p0='no-funny'
 p1='tabs	," (dq) and spaces'
 p2='just space'
-- 
1.0.GIT

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Use testlib to skip t3300-funny-names
  2006-01-05 11:53 Use testlib to skip t3300-funny-names Alex Riesen
@ 2006-01-06 22:38 ` Junio C Hamano
  2006-01-07  9:25   ` Alex Riesen
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-01-06 22:38 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

Alex Riesen <raa.lkml@gmail.com> writes:

> The test cannot be run on cygwin anyway.
> Corrected the error message to reflect the problem source.

I'd rather see the test actually try to create a funny-named
testfile and see if it managed to create it, so that it can be
skipped on non DOS systems that mounted DOS filesystem.

So instead I would do something like this:

---
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index 6a85d67..b1a86db 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -9,9 +9,6 @@ This test tries pathnames with funny cha
 tree, index, and tree objects.
 '
 
-# since FAT/NTFS does not allow tabs in filenames, skip this test
-test "$(uname -o 2>/dev/null)" = Cygwin && exit 0
-
 . ./test-lib.sh
 
 p0='no-funny'
@@ -27,6 +24,12 @@ EOF
 cat >"$p1" "$p0"
 echo 'Foo Bar Baz' >"$p2"
 
+test -f "$p1" && cmp "$p0" "$p1" || {
+	# since FAT/NTFS does not allow tabs in filenames, skip this test
+	say 'Your filesystem does not allow tabs in filenames, test skipped.'
+	test_done
+}
+
 echo 'just space
 no-funny' >expected
 test_expect_success 'git-ls-files no-funny' \

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Use testlib to skip t3300-funny-names
  2006-01-06 22:38 ` Junio C Hamano
@ 2006-01-07  9:25   ` Alex Riesen
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Riesen @ 2006-01-07  9:25 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano, Fri, Jan 06, 2006 23:38:03 +0100:
> > The test cannot be run on cygwin anyway.
> > Corrected the error message to reflect the problem source.
> 
> I'd rather see the test actually try to create a funny-named
> testfile and see if it managed to create it, so that it can be
> skipped on non DOS systems that mounted DOS filesystem.
> 
> So instead I would do something like this:
> 
> +test -f "$p1" && cmp "$p0" "$p1" || {
> +	# since FAT/NTFS does not allow tabs in filenames, skip this test
> +	say 'Your filesystem does not allow tabs in filenames, test skipped.'
> +	test_done
> +}

Yes, that's better

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-07  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 11:53 Use testlib to skip t3300-funny-names Alex Riesen
2006-01-06 22:38 ` Junio C Hamano
2006-01-07  9:25   ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).