git/list[1] front-page[2] threads[3] people[4] search[5] about
 

t4151 missing quotes

From
Armin Kunaschik <megabreit@googlemail.com>
Date
May 9, 2016, 16:09 UTC
Message-ID
<CALR6jEiBsU+jQ8VoRsniMdztCpVDemQ3r00W-OXdRP6ZEt9CFg@mail.gmail.com>
Hi there,

skipping through some failed tests I found more (smaller) problems inside the test... when test arguments are empty they need to be quoted (quite a lot test in this sentence).

Error is like t4151-am-abort.sh[5]: test: argument expected

My patch:
*** t4151-am-abort.sh   Mon May  9 17:51:44 2016
--- t4151-am-abort.sh.orig      Fri Apr 29 23:37:00 2016
***************
*** 67,73 ****
  test_expect_success 'am -3 --skip removes otherfile-4' '
        git reset --hard initial &&
        test_must_fail git am -3 0003-*.patch &&
!       test 3 -eq "$(git ls-files -u | wc -l)" &&
        test 4 = "$(cat otherfile-4)" &&
        git am --skip &&
        test_cmp_rev initial HEAD &&
--- 67,73 ----
  test_expect_success 'am -3 --skip removes otherfile-4' '
        git reset --hard initial &&
        test_must_fail git am -3 0003-*.patch &&
!       test 3 -eq $(git ls-files -u | wc -l) &&
        test 4 = "$(cat otherfile-4)" &&
        git am --skip &&
        test_cmp_rev initial HEAD &&
***************
*** 78,88 ****
  test_expect_success 'am -3 --abort removes otherfile-4' '
        git reset --hard initial &&
        test_must_fail git am -3 0003-*.patch &&
!       test 3 -eq "$(git ls-files -u | wc -l)" &&
        test 4 = "$(cat otherfile-4)" &&
        git am --abort &&
        test_cmp_rev initial HEAD &&
!       test -z "$(git ls-files -u)" &&
        test_path_is_missing otherfile-4
  '
--- 78,88 ----
  test_expect_success 'am -3 --abort removes otherfile-4' '
        git reset --hard initial &&
        test_must_fail git am -3 0003-*.patch &&
!       test 3 -eq $(git ls-files -u | wc -l) &&
        test 4 = "$(cat otherfile-4)" &&
        git am --abort &&
        test_cmp_rev initial HEAD &&
!       test -z $(git ls-files -u) &&
        test_path_is_missing otherfile-4
  '
***************
*** 146,152 ****
        git reset &&
        rm -f otherfile-4 otherfile-2 file-1 file-2 &&
        test_must_fail git am -3 initial.patch 0003-*.patch &&
!       test 3 -eq "$(git ls-files -u | wc -l)" &&
        test 4 = "$(cat otherfile-4)" &&
        git am --abort &&
        test -z "$(git ls-files -u)" &&
--- 146,152 ----
        git reset &&
        rm -f otherfile-4 otherfile-2 file-1 file-2 &&
        test_must_fail git am -3 initial.patch 0003-*.patch &&
!       test 3 -eq $(git ls-files -u | wc -l) &&
        test 4 = "$(cat otherfile-4)" &&
        git am --abort &&
        test -z "$(git ls-files -u)" &&

Regards, Armin

Next: Eric Sunshine
Message 1 of 13 in “t4151 missing quotes”
  1. Armin KunaschikMay 9, 2016
  2. Eric SunshineMay 9, 2016
  3. Eric SunshineMay 9, 2016
  4. Armin KunaschikMay 9, 2016
  5. Eric SunshineMay 9, 2016
  6. Armin KunaschikMay 9, 2016
  7. Junio C HamanoMay 9, 2016
  8. Stefan BellerMay 9, 2016
  9. Eric SunshineMay 9, 2016
  10. Junio C HamanoMay 9, 2016
  11. Eric SunshineMay 9, 2016
  12. Armin KunaschikMay 10, 2016
  13. Jeff KingMay 10, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.