(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'Test mode change diffs.\n'> <'\n'>)} spids: [13] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sed_script) op: assign_op.Equal rhs: {(SQ <'s/\\(:100644 100755\\) \\('>) (DQ ($ Id.VSub_DollarName '$_x40')) (SQ <'\\) \\2 /\\1 X X /'>) } spids: [24] ) ] ) (C {<test_expect_success>} {(SQ <setup>)} { (SQ <'\n'> <'\techo frotz >rezrov &&\n'> <'\tgit update-index --add rezrov &&\n'> <'\ttree=$(git write-tree) &&\n'> <'\techo $tree\n'> ) } ) (C {<test_expect_success>} {(SQ <chmod>)} { (SQ <'\n'> <'\ttest_chmod +x rezrov &&\n'> <'\tgit diff-index $tree >current &&\n'> <'\tsed -e "$sed_script" <current >check &&\n'> <'\techo ":100644 100755 X X M\trezrov" >expected &&\n'> <'\ttest_cmp expected check\n'> ) } ) (C {<test_expect_success>} {(SQ <'prepare binary file'>)} { (SQ <'\n'> <'\tgit commit -m rezrov &&\n'> <'\tprintf "\\00\\01\\02\\03\\04\\05\\06" >binbin &&\n'> <'\tgit add binbin &&\n'> <'\tgit commit -m binbin\n'> ) } ) (C {<test_done>}) ] )