@matheusbsbs / matheus-bagliano / commits / 5b46a4285f
Fork 0

Call 'say' outside test_expect_success

There were some uses of 'say' inside test_expect_success. But if the tests were not run in verbose mode, this message went to /dev/null. Pull them out of test_expect_success. Signed-off-by: Johannes Sixt <j6t@kdbg.org>

Johannes Sixt committed Mar 17, 2009 at 22:45 UTC 5b46a4285f3588eaa7e53d513025b28f9f5bfec7
3 files changed +22 -19
t/t0050-filesystem.sh
+7 -2
@@ -8,6 +8,7 @@ auml=`printf '\xc3\xa4'`
8 aumlcdiar=`printf '\x61\xcc\x88'`
9
10 case_insensitive=
11 +unibad=
12 test_expect_success 'see if we expect ' '
13
14 test_case=test_expect_success
@@ -19,7 +20,6 @@ test_expect_success 'see if we expect ' '
20 then
21 test_case=test_expect_failure
22 case_insensitive=t
22 - say "will test on a case insensitive filesystem"
23 fi &&
24 rm -fr junk &&
25 mkdir junk &&
@@ -27,13 +27,18 @@ test_expect_success 'see if we expect ' '
27 case "$(cd junk && echo *)" in
28 "$aumlcdiar")
29 test_unicode=test_expect_failure
30 - say "will test on a unicode corrupting filesystem"
30 + unibad=t
31 ;;
32 *) ;;
33 esac &&
34 rm -fr junk
35 '
36
37 +test "$case_insensitive" &&
38 + say "will test on a case insensitive filesystem"
39 +test "$unibad" &&
40 + say "will test on a unicode corrupting filesystem"
41 +
42 if test "$case_insensitive"
43 then
44 test_expect_success "detection of case insensitive filesystem during repo init" '
t/t3600-rm.sh
+2 -1
@@ -21,10 +21,11 @@ embedded'
21 embedded' &&
22 git commit -m 'add files with tabs and newlines'
23 else
24 - say 'Your filesystem does not allow tabs in filenames.'
24 test_tabs=n
25 fi"
26
27 +test "$test_tabs" = n && say 'Your filesystem does not allow tabs in filenames.'
28 +
29 # Later we will try removing an unremovable path to make sure
30 # git rm barfs, but if the test is run as root that cannot be
31 # arranged.
t/t7005-editor.sh
+13 -16
@@ -87,30 +87,27 @@ do
87 '
88 done
89
90 +if ! echo 'echo space > "$1"' > "e space.sh"
91 +then
92 + say "Skipping; FS does not support spaces in filenames"
93 + test_done
94 + exit
95 +fi
96 +
97 test_expect_success 'editor with a space' '
98
92 - if echo "echo space > \"\$1\"" > "e space.sh"
93 - then
94 - chmod a+x "e space.sh" &&
95 - GIT_EDITOR="./e\ space.sh" git commit --amend &&
96 - test space = "$(git show -s --pretty=format:%s)"
97 - else
98 - say "Skipping; FS does not support spaces in filenames"
99 - fi
99 + chmod a+x "e space.sh" &&
100 + GIT_EDITOR="./e\ space.sh" git commit --amend &&
101 + test space = "$(git show -s --pretty=format:%s)"
102
103 '
104
105 unset GIT_EDITOR
106 test_expect_success 'core.editor with a space' '
107
106 - if test -f "e space.sh"
107 - then
108 - git config core.editor \"./e\ space.sh\" &&
109 - git commit --amend &&
110 - test space = "$(git show -s --pretty=format:%s)"
111 - else
112 - say "Skipping; FS does not support spaces in filenames"
113 - fi
108 + git config core.editor \"./e\ space.sh\" &&
109 + git commit --amend &&
110 + test space = "$(git show -s --pretty=format:%s)"
111
112 '
113