t/t3905: use the name 'actual' for test output, swap arguments to test_cmp

It is common practice in the git test suite to use the file names 'actual' and 'expect' to hold the actual and expected output of commands. So change the name 'output' to 'actual'. Additionally, swap the order of arguments to test_cmp when comparing expected output and actual output so that if diff output is produced, it describes how the actual output differs from what was expected rather than the other way around. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Aug 26, 2011 at 19:59 UTC 4fd731240980f0f4b4565abe9092bd3d08d650e3
1 file changed +12 -12
t/t3905-stash-include-untracked.sh
+12 -12
@@ -23,13 +23,13 @@ test_expect_success 'stash save --include-untracked some dirty working directory
23 '
24
25 cat > expect <<EOF
26 +?? actual
27 ?? expect
27 -?? output
28 EOF
29
30 test_expect_success 'stash save --include-untracked cleaned the untracked files' '
31 - git status --porcelain > output
32 - test_cmp output expect
31 + git status --porcelain >actual
32 + test_cmp expect actual
33 '
34
35 cat > expect.diff <<EOF
@@ -47,10 +47,10 @@ EOF
47
48 test_expect_success 'stash save --include-untracked stashed the untracked files' '
49 test "!" -f file2 &&
50 - git diff HEAD..stash^3 -- file2 > output &&
51 - test_cmp output expect.diff &&
52 - git ls-tree --name-only stash^3: > output &&
53 - test_cmp output expect.lstree
50 + git diff HEAD..stash^3 -- file2 >actual &&
51 + test_cmp expect.diff actual &&
52 + git ls-tree --name-only stash^3: >actual &&
53 + test_cmp expect.lstree actual
54 '
55 test_expect_success 'stash save --patch --include-untracked fails' '
56 test_must_fail git stash --patch --include-untracked
@@ -64,15 +64,15 @@ git clean --force --quiet
64
65 cat > expect <<EOF
66 M file
67 +?? actual
68 ?? expect
69 ?? file2
69 -?? output
70 EOF
71
72 test_expect_success 'stash pop after save --include-untracked leaves files untracked again' '
73 git stash pop &&
74 - git status --porcelain > output
75 - test_cmp output expect
74 + git status --porcelain >actual
75 + test_cmp expect actual
76 '
77
78 git clean --force --quiet
@@ -96,8 +96,8 @@ EOF
96
97 test_expect_success 'stash save --include-untracked dirty index got stashed' '
98 git stash pop --index &&
99 - git diff --cached > output &&
100 - test_cmp output expect
99 + git diff --cached >actual &&
100 + test_cmp expect actual
101 '
102
103 git reset > /dev/null