(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:'Test string list functionality' span_id:15))} spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.ShFunction name: test_split body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:34) fd: -1 arg_word: {(expected)} ) ] ) (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.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:89) fd: -1 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') ] ) ] ) (command.Simple words: [{(test_split)} {(DQ ('foo:bar:baz'))} {(DQ (':'))} {(DQ (0))}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:125) fd: -1 here_begin: {(EOF)} here_end_span_id: 135 stdin_parts: [ ('1\n') ('[0]: ') (Id.Right_DoubleQuote '"') ('foo:bar:baz') (Id.Right_DoubleQuote '"') ('\n') ] ) ] ) (command.Simple words: [{(test_split)} {(DQ ('foo:bar:baz'))} {(DQ (':'))} {(DQ (1))}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:151) fd: -1 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') ] ) ] ) (command.Simple words: [{(test_split)} {(DQ ('foo:bar:baz'))} {(DQ (':'))} {(DQ (2))}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:182) fd: -1 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') ] ) ] ) (command.Simple words: [{(test_split)} {(DQ ('foo:bar:'))} {(DQ (':'))} {(DQ (-1))}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:218) fd: -1 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') ] ) ] ) (command.Simple words: [{(test_split)} {(DQ )} {(DQ (':'))} {(DQ (-1))}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:252) fd: -1 here_begin: {(EOF)} here_end_span_id: 261 stdin_parts: [('1\n') ('[0]: ') (Id.Right_DoubleQuote '"') (Id.Right_DoubleQuote '"') ('\n')] ) ] ) (command.Simple words: [{(test_split)} {(DQ (':'))} {(DQ (':'))} {(DQ (-1))}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:277) fd: -1 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') ] ) ] ) (C {(test_expect_success)} {(DQ ('test filter_string_list'))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:299) (Token id: Id.Lit_Chars val: '\ttest "x-" = "x$(test-string-list filter - y)" &&\n' span_id: 300 ) (Token id:Id.Lit_Chars val:'\ttest "x-" = "x$(test-string-list filter no y)" &&\n' span_id:301) (Token id: Id.Lit_Chars val: '\ttest yes = "$(test-string-list filter yes y)" &&\n' span_id: 302 ) (Token id:Id.Lit_Chars val:'\ttest yes = "$(test-string-list filter no:yes y)" &&\n' span_id:303) (Token id: Id.Lit_Chars val: '\ttest yes = "$(test-string-list filter yes:no y)" &&\n' span_id: 304 ) (Token id:Id.Lit_Chars val:'\ttest y1:y2 = "$(test-string-list filter y1:y2 y)" &&\n' span_id:305) (Token id: Id.Lit_Chars val: '\ttest y2:y1 = "$(test-string-list filter y2:y1 y)" &&\n' span_id: 306 ) (Token id:Id.Lit_Chars val:'\ttest "x-" = "x$(test-string-list filter x1:x2 y)"\n' span_id:307) ) } ) (C {(test_expect_success)} {(DQ ('test remove_duplicates'))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:318) (Token id: Id.Lit_Chars val: '\ttest "x-" = "x$(test-string-list remove_duplicates -)" &&\n' span_id: 319 ) (Token id: Id.Lit_Chars val: '\ttest "x" = "x$(test-string-list remove_duplicates "")" &&\n' span_id: 320 ) (Token id:Id.Lit_Chars val:'\ttest a = "$(test-string-list remove_duplicates a)" &&\n' span_id:321) (Token id: Id.Lit_Chars val: '\ttest a = "$(test-string-list remove_duplicates a:a)" &&\n' span_id: 322 ) (Token id: Id.Lit_Chars val: '\ttest a = "$(test-string-list remove_duplicates a:a:a:a:a)" &&\n' span_id: 323 ) (Token id: Id.Lit_Chars val: '\ttest a:b = "$(test-string-list remove_duplicates a:b)" &&\n' span_id: 324 ) (Token id: Id.Lit_Chars val: '\ttest a:b = "$(test-string-list remove_duplicates a:a:b)" &&\n' span_id: 325 ) (Token id: Id.Lit_Chars val: '\ttest a:b = "$(test-string-list remove_duplicates a:b:b)" &&\n' span_id: 326 ) (Token id: Id.Lit_Chars val: '\ttest a:b:c = "$(test-string-list remove_duplicates a:b:c)" &&\n' span_id: 327 ) (Token id: Id.Lit_Chars val: '\ttest a:b:c = "$(test-string-list remove_duplicates a:a:b:c)" &&\n' span_id: 328 ) (Token id: Id.Lit_Chars val: '\ttest a:b:c = "$(test-string-list remove_duplicates a:b:b:c)" &&\n' span_id: 329 ) (Token id: Id.Lit_Chars val: '\ttest a:b:c = "$(test-string-list remove_duplicates a:b:c:c)" &&\n' span_id: 330 ) (Token id: Id.Lit_Chars val: '\ttest a:b:c = "$(test-string-list remove_duplicates a:a:b:b:c:c)" &&\n' span_id: 331 ) (Token id: Id.Lit_Chars val: '\ttest a:b:c = "$(test-string-list remove_duplicates a:a:a:b:b:b:c:c:c)"\n' span_id: 332 ) ) } ) (C {(test_done)}) ] )