(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'Test string list functionality'>)} spids: [13] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShFunction name: test_split body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<cat>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})] do_fork: T ) (C {<test_expect_success>} { (DQ <'split '> ($ Id.VSub_Number '$1') <' at '> ($ Id.VSub_Number '$2') <', max '> ($ Id.VSub_Number '$3') ) } { (DQ <'\n'> <'\t\ttest-string-list split \''> ($ Id.VSub_Number '$1') <'\' \''> ($ Id.VSub_Number '$2') <'\' \''> ($ Id.VSub_Number '$3') <'\' >actual &&\n'> <'\t\ttest_cmp expected actual &&\n'> <'\t\ttest-string-list split_in_place \''> ($ Id.VSub_Number '$1') <'\' \''> ($ Id.VSub_Number '$2') <'\' \''> ($ Id.VSub_Number '$3') <'\' >actual &&\n'> <'\t\ttest_cmp expected actual\n'> <'\t'> ) } ) ] ) ] ) ) (command.Simple words: [{<test_split>} {(DQ <'foo:bar:baz'>)} {(DQ <':'>)} {(DQ <-1>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 109 stdin_parts: [ <'3\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <foo> <Id.Right_DoubleQuote '"'> <'\n'> <'[1]: '> <Id.Right_DoubleQuote '"'> <bar> <Id.Right_DoubleQuote '"'> <'\n'> <'[2]: '> <Id.Right_DoubleQuote '"'> <baz> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_split>} {(DQ <'foo:bar:baz'>)} {(DQ <':'>)} {(DQ <0>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 135 stdin_parts: [ <'1\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <'foo:bar:baz'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_split>} {(DQ <'foo:bar:baz'>)} {(DQ <':'>)} {(DQ <1>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 166 stdin_parts: [ <'2\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <foo> <Id.Right_DoubleQuote '"'> <'\n'> <'[1]: '> <Id.Right_DoubleQuote '"'> <'bar:baz'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_split>} {(DQ <'foo:bar:baz'>)} {(DQ <':'>)} {(DQ <2>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 202 stdin_parts: [ <'3\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <foo> <Id.Right_DoubleQuote '"'> <'\n'> <'[1]: '> <Id.Right_DoubleQuote '"'> <bar> <Id.Right_DoubleQuote '"'> <'\n'> <'[2]: '> <Id.Right_DoubleQuote '"'> <baz> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_split>} {(DQ <'foo:bar:'>)} {(DQ <':'>)} {(DQ <-1>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 237 stdin_parts: [ <'3\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <foo> <Id.Right_DoubleQuote '"'> <'\n'> <'[1]: '> <Id.Right_DoubleQuote '"'> <bar> <Id.Right_DoubleQuote '"'> <'\n'> <'[2]: '> <Id.Right_DoubleQuote '"'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_split>} {(DQ )} {(DQ <':'>)} {(DQ <-1>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 261 stdin_parts: [ <'1\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_split>} {(DQ <':'>)} {(DQ <':'>)} {(DQ <-1>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 290 stdin_parts: [ <'2\n'> <'[0]: '> <Id.Right_DoubleQuote '"'> <Id.Right_DoubleQuote '"'> <'\n'> <'[1]: '> <Id.Right_DoubleQuote '"'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(DQ <'test filter_string_list'>)} { (SQ <'\n'> <'\ttest "x-" = "x$(test-string-list filter - y)" &&\n'> <'\ttest "x-" = "x$(test-string-list filter no y)" &&\n'> <'\ttest yes = "$(test-string-list filter yes y)" &&\n'> <'\ttest yes = "$(test-string-list filter no:yes y)" &&\n'> <'\ttest yes = "$(test-string-list filter yes:no y)" &&\n'> <'\ttest y1:y2 = "$(test-string-list filter y1:y2 y)" &&\n'> <'\ttest y2:y1 = "$(test-string-list filter y2:y1 y)" &&\n'> <'\ttest "x-" = "x$(test-string-list filter x1:x2 y)"\n'> ) } ) (C {<test_expect_success>} {(DQ <'test remove_duplicates'>)} { (SQ <'\n'> <'\ttest "x-" = "x$(test-string-list remove_duplicates -)" &&\n'> <'\ttest "x" = "x$(test-string-list remove_duplicates "")" &&\n'> <'\ttest a = "$(test-string-list remove_duplicates a)" &&\n'> <'\ttest a = "$(test-string-list remove_duplicates a:a)" &&\n'> <'\ttest a = "$(test-string-list remove_duplicates a:a:a:a:a)" &&\n'> <'\ttest a:b = "$(test-string-list remove_duplicates a:b)" &&\n'> <'\ttest a:b = "$(test-string-list remove_duplicates a:a:b)" &&\n'> <'\ttest a:b = "$(test-string-list remove_duplicates a:b:b)" &&\n'> <'\ttest a:b:c = "$(test-string-list remove_duplicates a:b:c)" &&\n'> <'\ttest a:b:c = "$(test-string-list remove_duplicates a:a:b:c)" &&\n'> <'\ttest a:b:c = "$(test-string-list remove_duplicates a:b:b:c)" &&\n'> <'\ttest a:b:c = "$(test-string-list remove_duplicates a:b:c:c)" &&\n'> <'\ttest a:b:c = "$(test-string-list remove_duplicates a:a:b:b:c:c)" &&\n'> <'\ttest a:b:c = "$(test-string-list remove_duplicates a:a:a:b:b:b:c:c:c)"\n'> ) } ) (C {<test_done>}) ] )