(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'signals work as we expect'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[16]) (HereDoc op_id: Redir_DLess fd: 16777215 body: {(DQ ('three\n') ('two\n') ('one\n'))} do_expansion: True here_end: EOF was_filled: T spids: [19] ) ] ) (C {(test_expect_success)} {(SQ <'sigchain works'>)} { (SQ <'\n'> <'\t{ test-sigchain >actual; ret=$?; } &&\n'> <'\t{\n'> <'\t\t# Signal death by raise() on Windows acts like exit(3),\n'> <'\t\t# regardless of the signal number. So we must allow that\n'> <'\t\t# as well as the normal signal check.\n'> <'\t\ttest_match_signal 15 "$ret" ||\n'> <'\t\ttest "$ret" = 3\n'> <'\t} &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(KW_Bang '!') (MINGW)} {(SQ <'signals are propagated using shell convention'>)} { (SQ <'\n'> <'\t# we use exec here to avoid any sub-shell interpretation\n'> <'\t# of the exit code\n'> <'\tgit config alias.sigterm "!exec test-sigchain" &&\n'> <'\ttest_expect_code 143 git sigterm\n'> ) } ) (FuncDef name: large_git body: (BraceGroup children: [ (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children:[(C {(test_seq)} {(1)} {(100)})]) left_token: <Left_CommandSub '$('> spids: [79 85] ) } ] do_arg_iter: F body: (DoGroup children: [ (AndOr ops: [Op_DPipe] children: [ (C {(git)} {(diff)} {(--cached)} {(--binary)}) (ControlFlow token:<ControlFlow_Return return>) ] ) ] spids: [88 104] ) spids: [78 16777215] ) ] spids: [70] ) spids: [65 69] ) (C {(test_expect_success)} {(SQ <'create blob'>)} {(SQ <'\n'> <'\ttest-genrandom foo 16384 >file &&\n'> <'\tgit add file\n'>)} ) (C {(test_expect_success)} {(KW_Bang '!') (MINGW)} {(SQ <'a constipated git dies with SIGPIPE'>)} { (SQ <'\n'> <'\tOUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&\n'> <'\ttest_match_signal 13 "$OUT"\n'> ) } ) (C {(test_expect_success)} {(KW_Bang '!') (MINGW)} {(SQ <'a constipated git dies with SIGPIPE even if parent ignores it'>)} { (SQ <'\n'> <'\tOUT=$( ((trap "" PIPE; large_git; echo $? 1>&3) | :) 3>&1 ) &&\n'> <'\ttest_match_signal 13 "$OUT"\n'> ) } ) (C {(test_done)}) ] )