@matheusbsbs / matheus-bagliano / commits / 22669a045a
Fork 0

Remove unnecessary output from t3600-rm.

Moved the setup commands into test_expect_success blocks so their output is hidden unless -v is used. This makes the test suite look a little cleaner when the rm test-file setup step fails (and was expected to fail for most cases). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn Pearce committed May 29, 2006 at 04:06 UTC 22669a045a062c7884735219bc4f5f8a8dd183a2
1 file changed +23 -19
t/t3600-rm.sh
+23 -19
@@ -8,30 +8,34 @@ test_description='Test of the various options to git-rm.'
8 . ./test-lib.sh
9
10 # Setup some files to be removed, some with funny characters
11 -touch -- foo bar baz 'space embedded' -q
12 -git-add -- foo bar baz 'space embedded' -q
13 -git-commit -m "add normal files"
14 -test_tabs=y
15 -if touch -- 'tab embedded' 'newline
16 -embedded'
17 -then
18 -git-add -- 'tab embedded' 'newline
11 +test_expect_success \
12 + 'Initialize test directory' \
13 + "touch -- foo bar baz 'space embedded' -q &&
14 + git-add -- foo bar baz 'space embedded' -q &&
15 + git-commit -m 'add normal files' &&
16 + test_tabs=y &&
17 + if touch -- 'tab embedded' 'newline
18 embedded'
20 -git-commit -m "add files with tabs and newlines"
21 -else
22 - say 'Your filesystem does not allow tabs in filenames.'
23 - test_tabs=n
24 -fi
19 + then
20 + git-add -- 'tab embedded' 'newline
21 +embedded' &&
22 + git-commit -m 'add files with tabs and newlines'
23 + else
24 + say 'Your filesystem does not allow tabs in filenames.'
25 + test_tabs=n
26 + fi"
27
28 # Later we will try removing an unremovable path to make sure
29 # git-rm barfs, but if the test is run as root that cannot be
30 # arranged.
29 -: >test-file
30 -chmod a-w .
31 -rm -f test-file
32 -test -f test-file && test_failed_remove=y
33 -chmod 775 .
34 -rm -f test-file
31 +test_expect_success \
32 + 'Determine rm behavior' \
33 + ': >test-file
34 + chmod a-w .
35 + rm -f test-file
36 + test -f test-file && test_failed_remove=y
37 + chmod 775 .
38 + rm -f test-file'
39
40 test_expect_success \
41 'Pre-check that foo exists and is in index before git-rm foo' \