[PATCH] t4002: fix "diff can read from stdin" syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "D. Ben Knoble" <ben.knoble+github@xxxxxxxxx>

I noticed this test was producing output like

```
t4002-diff-basic.sh: test_expect_successdiff can read from stdin: not found
```

which is rather odd. Investigation shows an error of shell syntax:
foo'abc' is the same as fooabc to the shell. Perhaps obviously, this is
not a valid command for the test.

I am surprised this doesn't count as an error in the test, but that
accounts for it going unnoticed.

Signed-off-by: D. Ben Knoble <ben.knoble+github@xxxxxxxxx>
---
    t4002: fix "diff can read from stdin" syntax
    
    I noticed this test was producing output like
    
    t4002-diff-basic.sh: test_expect_successdiff can read from stdin: not found
    
    
    which is rather odd. Investigation shows an error of shell syntax:
    foo'abc' is the same as fooabc to the shell. Perhaps obviously, this is
    not a valid command for the test.
    
    I am surprised this doesn't count as an error in the test, but that
    accounts for it going unnoticed.
    
    ------------------------------------------------------------------------
    
    I would be interested in knowing how to "unsilence" failures like this
    so they do not go unnoticed in the future.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1545%2Fbenknoble%2Ft4002-diff-stdin-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1545/benknoble/t4002-diff-stdin-v1
Pull-Request: https://github.com/git/git/pull/1545

 t/t4002-diff-basic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index d524d4057dc..7afc883ec37 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -403,7 +403,7 @@ test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
 	git diff-tree -r -R $tree_A $tree_B >.test-b &&
 	cmp -s .test-a .test-b'
 
-test_expect_success'diff can read from stdin' '
+test_expect_success 'diff can read from stdin' '
 	test_must_fail git diff --no-index -- MN - < NN |
 		grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
 	test_must_fail git diff --no-index -- MN NN |

base-commit: aa9166bcc0ba654fc21f198a30647ec087f733ed
-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux