#!/bin/sh global test_description := ''git apply --numstat - text && git add text && echo goodbye >text && git diff >patch ' test_expect_success 'git apply --numstat - < patch' ' echo "1 1 text" >expect && git apply --numstat - actual && test_cmp expect actual ' test_expect_success 'git apply --numstat - < patch patch' ' for i in 1 2; do echo "1 1 text"; done >expect && git apply --numstat - < patch patch >actual && test_cmp expect actual ' test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git apply --numstat - )} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(setup)} { (SQ <"\n"> <"\techo hello >text &&\n"> <"\tgit add text &&\n"> <"\techo goodbye >text &&\n"> <"\tgit diff >patch\n"> ) } ) (C {(test_expect_success)} {(SQ <"git apply --numstat - < patch">)} { (SQ <"\n"> <"\techo \"1\t1\ttext\" >expect &&\n"> <"\tgit apply --numstat - actual &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"git apply --numstat - < patch patch">)} { (SQ <"\n"> <"\tfor i in 1 2; do echo \"1\t1\ttext\"; done >expect &&\n"> <"\tgit apply --numstat - < patch patch >actual &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_done)}) ] )