(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'signals work as we expect' span_id:6))} spids: [4] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:16) fd:-1 arg_word:{(expect)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:19) fd: -1 here_begin: {(EOF)} here_end_span_id: 26 stdin_parts: [('three\n') ('two\n') ('one\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'sigchain works' span_id:31))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:35) (Token id: Id.Lit_Chars val: '\t{ test-sigchain >actual; ret=$?; } &&\n' span_id: 36 ) (Token id:Id.Lit_Chars val:'\t{\n' span_id:37) (Token id: Id.Lit_Chars val: '\t\t# Signal death by raise() on Windows acts like exit(3),\n' span_id: 38 ) (Token id: Id.Lit_Chars val: '\t\t# regardless of the signal number. So we must allow that\n' span_id: 39 ) (Token id:Id.Lit_Chars val:'\t\t# as well as the normal signal check.\n' span_id:40) (Token id:Id.Lit_Chars val:'\t\ttest_match_signal 15 "$ret" ||\n' span_id:41) (Token id:Id.Lit_Chars val:'\t\ttest "$ret" = 3\n' span_id:42) (Token id:Id.Lit_Chars val:'\t} &&\n' span_id:43) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:44) ) } ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} {(SQ (Token id:Id.Lit_Chars val:'signals are propagated using shell convention' span_id:54))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:58) (Token id: Id.Lit_Chars val: '\t# we use exec here to avoid any sub-shell interpretation\n' span_id: 59 ) (Token id:Id.Lit_Chars val:'\t# of the exit code\n' span_id:60) (Token id: Id.Lit_Chars val: '\tgit config alias.sigterm "!exec test-sigchain" &&\n' span_id: 61 ) (Token id:Id.Lit_Chars val:'\ttest_expect_code 143 git sigterm\n' span_id:62) ) } ) (command.ShFunction name: large_git body: (command.BraceGroup children: [ (command.ForEach iter_name: i iter_words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:80) command_list: (command.CommandList children:[(C {(test_seq)} {(1)} {(100)})]) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(diff)} {(--cached)} {(--binary)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:102) ) ] ) ] ) ) ] ) ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'create blob' span_id:113))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:117) (Token id:Id.Lit_Chars val:'\ttest-genrandom foo 16384 >file &&\n' span_id:118) (Token id:Id.Lit_Chars val:'\tgit add file\n' span_id:119) ) } ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} {(SQ (Token id:Id.Lit_Chars val:'a constipated git dies with SIGPIPE' span_id:129))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:133) (Token id: Id.Lit_Chars val: '\tOUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&\n' span_id: 134 ) (Token id:Id.Lit_Chars val:'\ttest_match_signal 13 "$OUT"\n' span_id:135) ) } ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} { (SQ (Token id: Id.Lit_Chars val: 'a constipated git dies with SIGPIPE even if parent ignores it' span_id: 145 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:149) (Token id: Id.Lit_Chars val: '\tOUT=$( ((trap "" PIPE; large_git; echo $? 1>&3) | :) 3>&1 ) &&\n' span_id: 150 ) (Token id:Id.Lit_Chars val:'\ttest_match_signal 13 "$OUT"\n' span_id:151) ) } ) (C {(test_done)}) ] )