Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FluxTestPackages = []*ast.Package{&ast.Package{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: nil, }, Files: []*ast.File{&ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "length_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,long\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,len\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,1\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,7\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/,3\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,6\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/,10\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/,6\n\"\nt_string_len = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with len: strings.strlen(v: r._value)}),\n )\n\ntest _string_len = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_len})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "length_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "length_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "length_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "length_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "length_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "length_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "length_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "length_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "length_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,long\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,len\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,1\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,7\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/,3\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,6\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/,10\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/,6\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "length_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "length_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,long\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,len\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,1\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,7\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/,3\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,6\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/,10\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/,6\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,long\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,len\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,1\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,7\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/,3\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,6\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/,10\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/,6\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "length_test.flux", Source: "t_string_len = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with len: strings.strlen(v: r._value)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 33, }, File: "length_test.flux", Source: "t_string_len", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_len", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "length_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with len: strings.strlen(v: r._value)}),\n )", Start: ast.Position{ Column: 16, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 33, }, File: "length_test.flux", Source: "table", Start: ast.Position{ Column: 30, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "length_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 30, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "length_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "length_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "length_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "length_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "length_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "length_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "length_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with len: strings.strlen(v: r._value)}),\n )", Start: ast.Position{ Column: 30, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "length_test.flux", Source: "fn: (r) => ({r with len: strings.strlen(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "length_test.flux", Source: "fn: (r) => ({r with len: strings.strlen(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "length_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "length_test.flux", Source: "(r) => ({r with len: strings.strlen(v: r._value)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "length_test.flux", Source: "({r with len: strings.strlen(v: r._value)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 36, }, File: "length_test.flux", Source: "{r with len: strings.strlen(v: r._value)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 61, Line: 36, }, File: "length_test.flux", Source: "len: strings.strlen(v: r._value)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 36, }, File: "length_test.flux", Source: "len", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "len", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 36, }, File: "length_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 49, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 36, }, File: "length_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 49, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 36, }, File: "length_test.flux", Source: "v", Start: ast.Position{ Column: 49, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 36, }, File: "length_test.flux", Source: "r._value", Start: ast.Position{ Column: 52, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 53, Line: 36, }, File: "length_test.flux", Source: "r", Start: ast.Position{ Column: 52, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 36, }, File: "length_test.flux", Source: "_value", Start: ast.Position{ Column: 54, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 61, Line: 36, }, File: "length_test.flux", Source: "strings.strlen(v: r._value)", Start: ast.Position{ Column: 34, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 36, }, File: "length_test.flux", Source: "strings.strlen", Start: ast.Position{ Column: 34, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 36, }, File: "length_test.flux", Source: "strings", Start: ast.Position{ Column: 34, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 36, }, File: "length_test.flux", Source: "strlen", Start: ast.Position{ Column: 42, Line: 36, }, }, }, Name: "strlen", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "length_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "length_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "length_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "length_test.flux", Source: "map(\n fn: (r) => ({r with len: strings.strlen(v: r._value)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "length_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 33, }, File: "length_test.flux", Source: "table=<-", Start: ast.Position{ Column: 17, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 33, }, File: "length_test.flux", Source: "table", Start: ast.Position{ Column: 17, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 33, }, File: "length_test.flux", Source: "<-", Start: ast.Position{ Column: 23, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "length_test.flux", Source: "_string_len = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_len})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 39, }, File: "length_test.flux", Source: "_string_len", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_len", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "length_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_len})", Start: ast.Position{ Column: 20, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "length_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_len})", Start: ast.Position{ Column: 26, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 123, Line: 39, }, File: "length_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_len}", Start: ast.Position{ Column: 27, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "length_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 28, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 39, }, File: "length_test.flux", Source: "input", Start: ast.Position{ Column: 28, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 39, }, File: "length_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 55, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 39, }, File: "length_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 55, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "length_test.flux", Source: "csv", Start: ast.Position{ Column: 55, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 39, }, File: "length_test.flux", Source: "inData", Start: ast.Position{ Column: 60, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "length_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 35, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 39, }, File: "length_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 35, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 39, }, File: "length_test.flux", Source: "testing", Start: ast.Position{ Column: 35, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 39, }, File: "length_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 43, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "length_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 69, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 39, }, File: "length_test.flux", Source: "want", Start: ast.Position{ Column: 69, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 39, }, File: "length_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 91, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 39, }, File: "length_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 91, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "length_test.flux", Source: "csv", Start: ast.Position{ Column: 91, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 39, }, File: "length_test.flux", Source: "outData", Start: ast.Position{ Column: 96, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "length_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 75, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 90, Line: 39, }, File: "length_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 75, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 82, Line: 39, }, File: "length_test.flux", Source: "testing", Start: ast.Position{ Column: 75, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 90, Line: 39, }, File: "length_test.flux", Source: "loadMem", Start: ast.Position{ Column: 83, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 122, Line: 39, }, File: "length_test.flux", Source: "fn: t_string_len", Start: ast.Position{ Column: 106, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "length_test.flux", Source: "fn", Start: ast.Position{ Column: 106, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 122, Line: 39, }, File: "length_test.flux", Source: "t_string_len", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Name: "t_string_len", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "length_test.flux", Source: "test _string_len = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_len})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "length_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "length_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "length_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "length_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "length_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "length_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "length_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 37, }, File: "replaceAll_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9ngm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_replaceAll = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")}))\n\ntest _string_replaceAll = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replaceAll})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replaceAll_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "replaceAll_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replaceAll_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replaceAll_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replaceAll_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "replaceAll_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "replaceAll_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "replaceAll_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "replaceAll_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9ngm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "replaceAll_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "replaceAll_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9ngm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9ngm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 35, }, File: "replaceAll_test.flux", Source: "t_string_replaceAll = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")}))", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 33, }, File: "replaceAll_test.flux", Source: "t_string_replaceAll", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_replaceAll", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 35, }, File: "replaceAll_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")}))", Start: ast.Position{ Column: 23, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 33, }, File: "replaceAll_test.flux", Source: "table", Start: ast.Position{ Column: 37, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "replaceAll_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 37, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "replaceAll_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "replaceAll_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "replaceAll_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "replaceAll_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "replaceAll_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "replaceAll_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 35, }, File: "replaceAll_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")}))", Start: ast.Position{ Column: 37, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 35, }, File: "replaceAll_test.flux", Source: "fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")})", Start: ast.Position{ Column: 12, Line: 35, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 35, }, File: "replaceAll_test.flux", Source: "fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")})", Start: ast.Position{ Column: 12, Line: 35, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 35, }, File: "replaceAll_test.flux", Source: "fn", Start: ast.Position{ Column: 12, Line: 35, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 35, }, File: "replaceAll_test.flux", Source: "(r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")})", Start: ast.Position{ Column: 16, Line: 35, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 35, }, File: "replaceAll_test.flux", Source: "({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")})", Start: ast.Position{ Column: 23, Line: 35, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 35, }, File: "replaceAll_test.flux", Source: "{r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")}", Start: ast.Position{ Column: 24, Line: 35, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 35, }, File: "replaceAll_test.flux", Source: "_value: strings.replaceAll(v: r._value, t: \" \", u: \"\")", Start: ast.Position{ Column: 32, Line: 35, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 35, }, File: "replaceAll_test.flux", Source: "_value", Start: ast.Position{ Column: 32, Line: 35, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 35, }, File: "replaceAll_test.flux", Source: "v: r._value, t: \" \", u: \"\"", Start: ast.Position{ Column: 59, Line: 35, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 35, }, File: "replaceAll_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 59, Line: 35, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 35, }, File: "replaceAll_test.flux", Source: "v", Start: ast.Position{ Column: 59, Line: 35, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 35, }, File: "replaceAll_test.flux", Source: "r._value", Start: ast.Position{ Column: 62, Line: 35, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 35, }, File: "replaceAll_test.flux", Source: "r", Start: ast.Position{ Column: 62, Line: 35, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 35, }, File: "replaceAll_test.flux", Source: "_value", Start: ast.Position{ Column: 64, Line: 35, }, }, }, Name: "_value", }, Rbrack: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 78, Line: 35, }, File: "replaceAll_test.flux", Source: "t: \" \"", Start: ast.Position{ Column: 72, Line: 35, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 35, }, File: "replaceAll_test.flux", Source: "t", Start: ast.Position{ Column: 72, Line: 35, }, }, }, Name: "t", }, Separator: nil, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 78, Line: 35, }, File: "replaceAll_test.flux", Source: "\" \"", Start: ast.Position{ Column: 75, Line: 35, }, }, }, Value: " ", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 35, }, File: "replaceAll_test.flux", Source: "u: \"\"", Start: ast.Position{ Column: 80, Line: 35, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 35, }, File: "replaceAll_test.flux", Source: "u", Start: ast.Position{ Column: 80, Line: 35, }, }, }, Name: "u", }, Separator: nil, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 35, }, File: "replaceAll_test.flux", Source: "\"\"", Start: ast.Position{ Column: 83, Line: 35, }, }, }, Value: "", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 35, }, File: "replaceAll_test.flux", Source: "strings.replaceAll(v: r._value, t: \" \", u: \"\")", Start: ast.Position{ Column: 40, Line: 35, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 35, }, File: "replaceAll_test.flux", Source: "strings.replaceAll", Start: ast.Position{ Column: 40, Line: 35, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 35, }, File: "replaceAll_test.flux", Source: "strings", Start: ast.Position{ Column: 40, Line: 35, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 35, }, File: "replaceAll_test.flux", Source: "replaceAll", Start: ast.Position{ Column: 48, Line: 35, }, }, }, Name: "replaceAll", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 35, }, File: "replaceAll_test.flux", Source: "r", Start: ast.Position{ Column: 25, Line: 35, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 35, }, File: "replaceAll_test.flux", Source: "r", Start: ast.Position{ Column: 17, Line: 35, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 35, }, File: "replaceAll_test.flux", Source: "r", Start: ast.Position{ Column: 17, Line: 35, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 35, }, File: "replaceAll_test.flux", Source: "map(fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: \" \", u: \"\")}))", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "replaceAll_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 33, }, File: "replaceAll_test.flux", Source: "table=<-", Start: ast.Position{ Column: 24, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "replaceAll_test.flux", Source: "table", Start: ast.Position{ Column: 24, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 33, }, File: "replaceAll_test.flux", Source: "<-", Start: ast.Position{ Column: 30, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 37, }, File: "replaceAll_test.flux", Source: "_string_replaceAll = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replaceAll})", Start: ast.Position{ Column: 6, Line: 37, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 24, Line: 37, }, File: "replaceAll_test.flux", Source: "_string_replaceAll", Start: ast.Position{ Column: 6, Line: 37, }, }, }, Name: "_string_replaceAll", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 37, }, File: "replaceAll_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replaceAll})", Start: ast.Position{ Column: 27, Line: 37, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 37, }, File: "replaceAll_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replaceAll})", Start: ast.Position{ Column: 33, Line: 37, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 137, Line: 37, }, File: "replaceAll_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replaceAll}", Start: ast.Position{ Column: 34, Line: 37, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 74, Line: 37, }, File: "replaceAll_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 35, Line: 37, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 37, }, File: "replaceAll_test.flux", Source: "input", Start: ast.Position{ Column: 35, Line: 37, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 37, }, File: "replaceAll_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 62, Line: 37, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 37, }, File: "replaceAll_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 62, Line: 37, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 37, }, File: "replaceAll_test.flux", Source: "csv", Start: ast.Position{ Column: 62, Line: 37, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 37, }, File: "replaceAll_test.flux", Source: "inData", Start: ast.Position{ Column: 67, Line: 37, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 74, Line: 37, }, File: "replaceAll_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 42, Line: 37, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 61, Line: 37, }, File: "replaceAll_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 42, Line: 37, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 37, }, File: "replaceAll_test.flux", Source: "testing", Start: ast.Position{ Column: 42, Line: 37, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 61, Line: 37, }, File: "replaceAll_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 50, Line: 37, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 111, Line: 37, }, File: "replaceAll_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 76, Line: 37, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 37, }, File: "replaceAll_test.flux", Source: "want", Start: ast.Position{ Column: 76, Line: 37, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 110, Line: 37, }, File: "replaceAll_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 98, Line: 37, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 110, Line: 37, }, File: "replaceAll_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 98, Line: 37, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 101, Line: 37, }, File: "replaceAll_test.flux", Source: "csv", Start: ast.Position{ Column: 98, Line: 37, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 110, Line: 37, }, File: "replaceAll_test.flux", Source: "outData", Start: ast.Position{ Column: 103, Line: 37, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 111, Line: 37, }, File: "replaceAll_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 82, Line: 37, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 97, Line: 37, }, File: "replaceAll_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 82, Line: 37, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 37, }, File: "replaceAll_test.flux", Source: "testing", Start: ast.Position{ Column: 82, Line: 37, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 97, Line: 37, }, File: "replaceAll_test.flux", Source: "loadMem", Start: ast.Position{ Column: 90, Line: 37, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 136, Line: 37, }, File: "replaceAll_test.flux", Source: "fn: t_string_replaceAll", Start: ast.Position{ Column: 113, Line: 37, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 115, Line: 37, }, File: "replaceAll_test.flux", Source: "fn", Start: ast.Position{ Column: 113, Line: 37, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 136, Line: 37, }, File: "replaceAll_test.flux", Source: "t_string_replaceAll", Start: ast.Position{ Column: 117, Line: 37, }, }, }, Name: "t_string_replaceAll", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 37, }, File: "replaceAll_test.flux", Source: "test _string_replaceAll = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replaceAll})", Start: ast.Position{ Column: 1, Line: 37, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "replaceAll_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "replaceAll_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "replaceAll_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "replaceAll_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "replaceAll_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "replaceAll_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "replaceAll_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "replace_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c NMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_replace = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)}),\n )\n\ntest _string_replace = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replace})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replace_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "replace_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replace_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replace_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "replace_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "replace_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "replace_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "replace_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "replace_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c NMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "replace_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "replace_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c NMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c NMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "replace_test.flux", Source: "t_string_replace = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 33, }, File: "replace_test.flux", Source: "t_string_replace", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_replace", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "replace_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)}),\n )", Start: ast.Position{ Column: 20, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 33, }, File: "replace_test.flux", Source: "table", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "replace_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "replace_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "replace_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "replace_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "replace_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "replace_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "replace_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "replace_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)}),\n )", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 92, Line: 36, }, File: "replace_test.flux", Source: "fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 92, Line: 36, }, File: "replace_test.flux", Source: "fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "replace_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 92, Line: 36, }, File: "replace_test.flux", Source: "(r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 92, Line: 36, }, File: "replace_test.flux", Source: "({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 91, Line: 36, }, File: "replace_test.flux", Source: "{r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 90, Line: 36, }, File: "replace_test.flux", Source: "_value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 36, }, File: "replace_test.flux", Source: "_value", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 36, }, File: "replace_test.flux", Source: "v: r._value, t: \"LnSk\", u: \" \", i: 1", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "replace_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "replace_test.flux", Source: "v", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "replace_test.flux", Source: "r._value", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 57, Line: 36, }, File: "replace_test.flux", Source: "r", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "replace_test.flux", Source: "_value", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 75, Line: 36, }, File: "replace_test.flux", Source: "t: \"LnSk\"", Start: ast.Position{ Column: 66, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "replace_test.flux", Source: "t", Start: ast.Position{ Column: 66, Line: 36, }, }, }, Name: "t", }, Separator: nil, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 75, Line: 36, }, File: "replace_test.flux", Source: "\"LnSk\"", Start: ast.Position{ Column: 69, Line: 36, }, }, }, Value: "LnSk", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 83, Line: 36, }, File: "replace_test.flux", Source: "u: \" \"", Start: ast.Position{ Column: 77, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 78, Line: 36, }, File: "replace_test.flux", Source: "u", Start: ast.Position{ Column: 77, Line: 36, }, }, }, Name: "u", }, Separator: nil, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 83, Line: 36, }, File: "replace_test.flux", Source: "\" \"", Start: ast.Position{ Column: 80, Line: 36, }, }, }, Value: " ", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 36, }, File: "replace_test.flux", Source: "i: 1", Start: ast.Position{ Column: 85, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 36, }, File: "replace_test.flux", Source: "i", Start: ast.Position{ Column: 85, Line: 36, }, }, }, Name: "i", }, Separator: nil, Value: &ast.IntegerLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 36, }, File: "replace_test.flux", Source: "1", Start: ast.Position{ Column: 88, Line: 36, }, }, }, Value: int64(1), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 90, Line: 36, }, File: "replace_test.flux", Source: "strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "replace_test.flux", Source: "strings.replace", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 36, }, File: "replace_test.flux", Source: "strings", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "replace_test.flux", Source: "replace", Start: ast.Position{ Column: 45, Line: 36, }, }, }, Name: "replace", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "replace_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "replace_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "replace_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "replace_test.flux", Source: "map(\n fn: (r) => ({r with _value: strings.replace(v: r._value, t: \"LnSk\", u: \" \", i: 1)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "replace_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "replace_test.flux", Source: "table=<-", Start: ast.Position{ Column: 21, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 33, }, File: "replace_test.flux", Source: "table", Start: ast.Position{ Column: 21, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "replace_test.flux", Source: "<-", Start: ast.Position{ Column: 27, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "replace_test.flux", Source: "_string_replace = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replace})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 39, }, File: "replace_test.flux", Source: "_string_replace", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_replace", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "replace_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replace})", Start: ast.Position{ Column: 24, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "replace_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replace})", Start: ast.Position{ Column: 30, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 131, Line: 39, }, File: "replace_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replace}", Start: ast.Position{ Column: 31, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 71, Line: 39, }, File: "replace_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 32, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 39, }, File: "replace_test.flux", Source: "input", Start: ast.Position{ Column: 32, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "replace_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "replace_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 39, }, File: "replace_test.flux", Source: "csv", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "replace_test.flux", Source: "inData", Start: ast.Position{ Column: 64, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 71, Line: 39, }, File: "replace_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "replace_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 39, }, File: "replace_test.flux", Source: "testing", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "replace_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 47, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "replace_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 73, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 77, Line: 39, }, File: "replace_test.flux", Source: "want", Start: ast.Position{ Column: 73, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "replace_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "replace_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 39, }, File: "replace_test.flux", Source: "csv", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "replace_test.flux", Source: "outData", Start: ast.Position{ Column: 100, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "replace_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "replace_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 39, }, File: "replace_test.flux", Source: "testing", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "replace_test.flux", Source: "loadMem", Start: ast.Position{ Column: 87, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "replace_test.flux", Source: "fn: t_string_replace", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 39, }, File: "replace_test.flux", Source: "fn", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "replace_test.flux", Source: "t_string_replace", Start: ast.Position{ Column: 114, Line: 39, }, }, }, Name: "t_string_replace", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "replace_test.flux", Source: "test _string_replace = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_replace})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "replace_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "replace_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "replace_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "replace_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "replace_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "replace_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "replace_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "subset_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,1,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_subset = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)}),\n )\n\ntest _string_subset = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_subset})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "subset_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "subset_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "subset_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "subset_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "subset_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "subset_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "subset_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "subset_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "subset_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,1,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "subset_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "subset_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,1,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,c,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,1,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "subset_test.flux", Source: "t_string_subset = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 33, }, File: "subset_test.flux", Source: "t_string_subset", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_subset", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "subset_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)}),\n )", Start: ast.Position{ Column: 19, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 33, }, File: "subset_test.flux", Source: "table", Start: ast.Position{ Column: 33, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "subset_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 33, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "subset_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "subset_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "subset_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "subset_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "subset_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "subset_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "subset_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)}),\n )", Start: ast.Position{ Column: 33, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 36, }, File: "subset_test.flux", Source: "fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 36, }, File: "subset_test.flux", Source: "fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "subset_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 36, }, File: "subset_test.flux", Source: "(r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 36, }, File: "subset_test.flux", Source: "({r with _value: strings.substring(v: r._value, start: 0, end: 1)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 36, }, File: "subset_test.flux", Source: "{r with _value: strings.substring(v: r._value, start: 0, end: 1)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 36, }, File: "subset_test.flux", Source: "_value: strings.substring(v: r._value, start: 0, end: 1)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 36, }, File: "subset_test.flux", Source: "_value", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 36, }, File: "subset_test.flux", Source: "v: r._value, start: 0, end: 1", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "subset_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 56, Line: 36, }, File: "subset_test.flux", Source: "v", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "subset_test.flux", Source: "r._value", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 59, Line: 36, }, File: "subset_test.flux", Source: "r", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "subset_test.flux", Source: "_value", Start: ast.Position{ Column: 60, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 76, Line: 36, }, File: "subset_test.flux", Source: "start: 0", Start: ast.Position{ Column: 68, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 36, }, File: "subset_test.flux", Source: "start", Start: ast.Position{ Column: 68, Line: 36, }, }, }, Name: "start", }, Separator: nil, Value: &ast.IntegerLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 76, Line: 36, }, File: "subset_test.flux", Source: "0", Start: ast.Position{ Column: 75, Line: 36, }, }, }, Value: int64(0), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 36, }, File: "subset_test.flux", Source: "end: 1", Start: ast.Position{ Column: 78, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 36, }, File: "subset_test.flux", Source: "end", Start: ast.Position{ Column: 78, Line: 36, }, }, }, Name: "end", }, Separator: nil, Value: &ast.IntegerLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 36, }, File: "subset_test.flux", Source: "1", Start: ast.Position{ Column: 83, Line: 36, }, }, }, Value: int64(1), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 36, }, File: "subset_test.flux", Source: "strings.substring(v: r._value, start: 0, end: 1)", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "subset_test.flux", Source: "strings.substring", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 36, }, File: "subset_test.flux", Source: "strings", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "subset_test.flux", Source: "substring", Start: ast.Position{ Column: 45, Line: 36, }, }, }, Name: "substring", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "subset_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "subset_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "subset_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "subset_test.flux", Source: "map(\n fn: (r) => ({r with _value: strings.substring(v: r._value, start: 0, end: 1)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "subset_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 28, Line: 33, }, File: "subset_test.flux", Source: "table=<-", Start: ast.Position{ Column: 20, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 33, }, File: "subset_test.flux", Source: "table", Start: ast.Position{ Column: 20, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 28, Line: 33, }, File: "subset_test.flux", Source: "<-", Start: ast.Position{ Column: 26, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "subset_test.flux", Source: "_string_subset = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_subset})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 39, }, File: "subset_test.flux", Source: "_string_subset", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_subset", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "subset_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_subset})", Start: ast.Position{ Column: 23, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "subset_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_subset})", Start: ast.Position{ Column: 29, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 129, Line: 39, }, File: "subset_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_subset}", Start: ast.Position{ Column: 30, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "subset_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 31, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 39, }, File: "subset_test.flux", Source: "input", Start: ast.Position{ Column: 31, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 39, }, File: "subset_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 58, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 39, }, File: "subset_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 58, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 61, Line: 39, }, File: "subset_test.flux", Source: "csv", Start: ast.Position{ Column: 58, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 39, }, File: "subset_test.flux", Source: "inData", Start: ast.Position{ Column: 63, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "subset_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 38, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 57, Line: 39, }, File: "subset_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 38, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 39, }, File: "subset_test.flux", Source: "testing", Start: ast.Position{ Column: 38, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 57, Line: 39, }, File: "subset_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 46, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "subset_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 72, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 76, Line: 39, }, File: "subset_test.flux", Source: "want", Start: ast.Position{ Column: 72, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 39, }, File: "subset_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 94, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 39, }, File: "subset_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 94, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 97, Line: 39, }, File: "subset_test.flux", Source: "csv", Start: ast.Position{ Column: 94, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 39, }, File: "subset_test.flux", Source: "outData", Start: ast.Position{ Column: 99, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "subset_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 78, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 93, Line: 39, }, File: "subset_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 78, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 39, }, File: "subset_test.flux", Source: "testing", Start: ast.Position{ Column: 78, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 93, Line: 39, }, File: "subset_test.flux", Source: "loadMem", Start: ast.Position{ Column: 86, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "subset_test.flux", Source: "fn: t_string_subset", Start: ast.Position{ Column: 109, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 111, Line: 39, }, File: "subset_test.flux", Source: "fn", Start: ast.Position{ Column: 109, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "subset_test.flux", Source: "t_string_subset", Start: ast.Position{ Column: 113, Line: 39, }, }, }, Name: "t_string_subset", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "subset_test.flux", Source: "test _string_subset = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_subset})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "subset_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "subset_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "subset_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "subset_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "subset_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "subset_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "subset_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "substring_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,sub\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,字\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,m\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/,.\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,e\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/,ī\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/,z\n\"\nt_string_sub = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))}),\n )\n\ntest _string_sub = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_sub})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "substring_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "substring_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "substring_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "substring_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "substring_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "substring_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "substring_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "substring_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "substring_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,sub\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,字\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,m\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/,.\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,e\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/,ī\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/,z\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "substring_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "substring_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,sub\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,字\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,m\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/,.\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,e\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/,ī\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/,z\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true,false\n#default,_result,,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path,sub\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,字,used_percent,disk,disk1,apfs,host.local,/,字\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/,m\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b .,used_percent,disk,disk1,apfs,host.local,/,.\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/,e\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI ī,used_percent,disk,disk1,apfs,host.local,/,ī\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 z,used_percent,disk,disk1,apfs,host.local,/,z\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "substring_test.flux", Source: "t_string_sub = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 33, }, File: "substring_test.flux", Source: "t_string_sub", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_sub", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "substring_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))}),\n )", Start: ast.Position{ Column: 16, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 33, }, File: "substring_test.flux", Source: "table", Start: ast.Position{ Column: 30, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "substring_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 30, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "substring_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "substring_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "substring_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "substring_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "substring_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "substring_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "substring_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))}),\n )", Start: ast.Position{ Column: 30, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 140, Line: 36, }, File: "substring_test.flux", Source: "fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 140, Line: 36, }, File: "substring_test.flux", Source: "fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "substring_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 140, Line: 36, }, File: "substring_test.flux", Source: "(r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 140, Line: 36, }, File: "substring_test.flux", Source: "({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 139, Line: 36, }, File: "substring_test.flux", Source: "{r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 36, }, File: "substring_test.flux", Source: "sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 36, }, File: "substring_test.flux", Source: "sub", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "sub", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 137, Line: 36, }, File: "substring_test.flux", Source: "v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value)", Start: ast.Position{ Column: 52, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "substring_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 52, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 53, Line: 36, }, File: "substring_test.flux", Source: "v", Start: ast.Position{ Column: 52, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "substring_test.flux", Source: "r._value", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 56, Line: 36, }, File: "substring_test.flux", Source: "r", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "substring_test.flux", Source: "_value", Start: ast.Position{ Column: 57, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 36, }, File: "substring_test.flux", Source: "start: strings.strlen(v: r._value) - 1", Start: ast.Position{ Column: 65, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 36, }, File: "substring_test.flux", Source: "start", Start: ast.Position{ Column: 65, Line: 36, }, }, }, Name: "start", }, Separator: nil, Value: &ast.BinaryExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 36, }, File: "substring_test.flux", Source: "strings.strlen(v: r._value) - 1", Start: ast.Position{ Column: 72, Line: 36, }, }, }, Left: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 36, }, File: "substring_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 87, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 36, }, File: "substring_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 87, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 36, }, File: "substring_test.flux", Source: "v", Start: ast.Position{ Column: 87, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 36, }, File: "substring_test.flux", Source: "r._value", Start: ast.Position{ Column: 90, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 91, Line: 36, }, File: "substring_test.flux", Source: "r", Start: ast.Position{ Column: 90, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 36, }, File: "substring_test.flux", Source: "_value", Start: ast.Position{ Column: 92, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 99, Line: 36, }, File: "substring_test.flux", Source: "strings.strlen(v: r._value)", Start: ast.Position{ Column: 72, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 36, }, File: "substring_test.flux", Source: "strings.strlen", Start: ast.Position{ Column: 72, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 79, Line: 36, }, File: "substring_test.flux", Source: "strings", Start: ast.Position{ Column: 72, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 36, }, File: "substring_test.flux", Source: "strlen", Start: ast.Position{ Column: 80, Line: 36, }, }, }, Name: "strlen", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, Operator: 6, Right: &ast.IntegerLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 36, }, File: "substring_test.flux", Source: "1", Start: ast.Position{ Column: 102, Line: 36, }, }, }, Value: int64(1), }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 137, Line: 36, }, File: "substring_test.flux", Source: "end: strings.strlen(v: r._value)", Start: ast.Position{ Column: 105, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 36, }, File: "substring_test.flux", Source: "end", Start: ast.Position{ Column: 105, Line: 36, }, }, }, Name: "end", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 136, Line: 36, }, File: "substring_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 125, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 136, Line: 36, }, File: "substring_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 125, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 36, }, File: "substring_test.flux", Source: "v", Start: ast.Position{ Column: 125, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 136, Line: 36, }, File: "substring_test.flux", Source: "r._value", Start: ast.Position{ Column: 128, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 129, Line: 36, }, File: "substring_test.flux", Source: "r", Start: ast.Position{ Column: 128, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 136, Line: 36, }, File: "substring_test.flux", Source: "_value", Start: ast.Position{ Column: 130, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 137, Line: 36, }, File: "substring_test.flux", Source: "strings.strlen(v: r._value)", Start: ast.Position{ Column: 110, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 36, }, File: "substring_test.flux", Source: "strings.strlen", Start: ast.Position{ Column: 110, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 117, Line: 36, }, File: "substring_test.flux", Source: "strings", Start: ast.Position{ Column: 110, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 36, }, File: "substring_test.flux", Source: "strlen", Start: ast.Position{ Column: 118, Line: 36, }, }, }, Name: "strlen", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 138, Line: 36, }, File: "substring_test.flux", Source: "strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))", Start: ast.Position{ Column: 34, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 36, }, File: "substring_test.flux", Source: "strings.substring", Start: ast.Position{ Column: 34, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 36, }, File: "substring_test.flux", Source: "strings", Start: ast.Position{ Column: 34, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 36, }, File: "substring_test.flux", Source: "substring", Start: ast.Position{ Column: 42, Line: 36, }, }, }, Name: "substring", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "substring_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "substring_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "substring_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "substring_test.flux", Source: "map(\n fn: (r) => ({r with sub: strings.substring(v: r._value, start: strings.strlen(v: r._value) - 1, end: strings.strlen(v: r._value))}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "substring_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 33, }, File: "substring_test.flux", Source: "table=<-", Start: ast.Position{ Column: 17, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 33, }, File: "substring_test.flux", Source: "table", Start: ast.Position{ Column: 17, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 33, }, File: "substring_test.flux", Source: "<-", Start: ast.Position{ Column: 23, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "substring_test.flux", Source: "_string_sub = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_sub})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 39, }, File: "substring_test.flux", Source: "_string_sub", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_sub", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "substring_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_sub})", Start: ast.Position{ Column: 20, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "substring_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_sub})", Start: ast.Position{ Column: 26, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 123, Line: 39, }, File: "substring_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_sub}", Start: ast.Position{ Column: 27, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "substring_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 28, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 39, }, File: "substring_test.flux", Source: "input", Start: ast.Position{ Column: 28, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 39, }, File: "substring_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 55, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 39, }, File: "substring_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 55, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "substring_test.flux", Source: "csv", Start: ast.Position{ Column: 55, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 39, }, File: "substring_test.flux", Source: "inData", Start: ast.Position{ Column: 60, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "substring_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 35, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 39, }, File: "substring_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 35, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 39, }, File: "substring_test.flux", Source: "testing", Start: ast.Position{ Column: 35, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 39, }, File: "substring_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 43, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "substring_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 69, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 39, }, File: "substring_test.flux", Source: "want", Start: ast.Position{ Column: 69, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 39, }, File: "substring_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 91, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 39, }, File: "substring_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 91, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "substring_test.flux", Source: "csv", Start: ast.Position{ Column: 91, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 39, }, File: "substring_test.flux", Source: "outData", Start: ast.Position{ Column: 96, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "substring_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 75, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 90, Line: 39, }, File: "substring_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 75, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 82, Line: 39, }, File: "substring_test.flux", Source: "testing", Start: ast.Position{ Column: 75, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 90, Line: 39, }, File: "substring_test.flux", Source: "loadMem", Start: ast.Position{ Column: 83, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 122, Line: 39, }, File: "substring_test.flux", Source: "fn: t_string_sub", Start: ast.Position{ Column: 106, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "substring_test.flux", Source: "fn", Start: ast.Position{ Column: 106, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 122, Line: 39, }, File: "substring_test.flux", Source: "t_string_sub", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Name: "t_string_sub", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "substring_test.flux", Source: "test _string_sub = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_sub})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "substring_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "substring_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "substring_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "substring_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "substring_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "substring_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "substring_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "title_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9n Gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_title = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.title(v: r._value)}),\n )\n\ntest _string_title = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_title})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "title_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "title_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "title_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "title_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "title_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "title_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "title_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "title_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "title_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9n Gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "title_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "title_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9n Gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9n Gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "title_test.flux", Source: "t_string_title = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.title(v: r._value)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 33, }, File: "title_test.flux", Source: "t_string_title", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_title", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "title_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.title(v: r._value)}),\n )", Start: ast.Position{ Column: 18, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 33, }, File: "title_test.flux", Source: "table", Start: ast.Position{ Column: 32, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "title_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 32, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "title_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "title_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "title_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "title_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "title_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "title_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "title_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.title(v: r._value)}),\n )", Start: ast.Position{ Column: 32, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "title_test.flux", Source: "fn: (r) => ({r with _value: strings.title(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "title_test.flux", Source: "fn: (r) => ({r with _value: strings.title(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "title_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "title_test.flux", Source: "(r) => ({r with _value: strings.title(v: r._value)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "title_test.flux", Source: "({r with _value: strings.title(v: r._value)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "title_test.flux", Source: "{r with _value: strings.title(v: r._value)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "title_test.flux", Source: "_value: strings.title(v: r._value)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 36, }, File: "title_test.flux", Source: "_value", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 36, }, File: "title_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 51, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 36, }, File: "title_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 51, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "title_test.flux", Source: "v", Start: ast.Position{ Column: 51, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 36, }, File: "title_test.flux", Source: "r._value", Start: ast.Position{ Column: 54, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 55, Line: 36, }, File: "title_test.flux", Source: "r", Start: ast.Position{ Column: 54, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 36, }, File: "title_test.flux", Source: "_value", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 63, Line: 36, }, File: "title_test.flux", Source: "strings.title(v: r._value)", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 36, }, File: "title_test.flux", Source: "strings.title", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 36, }, File: "title_test.flux", Source: "strings", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 36, }, File: "title_test.flux", Source: "title", Start: ast.Position{ Column: 45, Line: 36, }, }, }, Name: "title", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "title_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "title_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "title_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "title_test.flux", Source: "map(\n fn: (r) => ({r with _value: strings.title(v: r._value)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "title_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 33, }, File: "title_test.flux", Source: "table=<-", Start: ast.Position{ Column: 19, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 24, Line: 33, }, File: "title_test.flux", Source: "table", Start: ast.Position{ Column: 19, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 33, }, File: "title_test.flux", Source: "<-", Start: ast.Position{ Column: 25, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "title_test.flux", Source: "_string_title = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_title})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 39, }, File: "title_test.flux", Source: "_string_title", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_title", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "title_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_title})", Start: ast.Position{ Column: 22, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "title_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_title})", Start: ast.Position{ Column: 28, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 127, Line: 39, }, File: "title_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_title}", Start: ast.Position{ Column: 29, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 39, }, File: "title_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 30, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 39, }, File: "title_test.flux", Source: "input", Start: ast.Position{ Column: 30, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 39, }, File: "title_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 57, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 39, }, File: "title_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 57, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 39, }, File: "title_test.flux", Source: "csv", Start: ast.Position{ Column: 57, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 39, }, File: "title_test.flux", Source: "inData", Start: ast.Position{ Column: 62, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 39, }, File: "title_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 37, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 56, Line: 39, }, File: "title_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 37, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 39, }, File: "title_test.flux", Source: "testing", Start: ast.Position{ Column: 37, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 56, Line: 39, }, File: "title_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 45, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 39, }, File: "title_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 71, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 75, Line: 39, }, File: "title_test.flux", Source: "want", Start: ast.Position{ Column: 71, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 39, }, File: "title_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 93, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 39, }, File: "title_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 93, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 96, Line: 39, }, File: "title_test.flux", Source: "csv", Start: ast.Position{ Column: 93, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 39, }, File: "title_test.flux", Source: "outData", Start: ast.Position{ Column: 98, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 39, }, File: "title_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 77, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 92, Line: 39, }, File: "title_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 77, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 39, }, File: "title_test.flux", Source: "testing", Start: ast.Position{ Column: 77, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 92, Line: 39, }, File: "title_test.flux", Source: "loadMem", Start: ast.Position{ Column: 85, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "title_test.flux", Source: "fn: t_string_title", Start: ast.Position{ Column: 108, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 110, Line: 39, }, File: "title_test.flux", Source: "fn", Start: ast.Position{ Column: 108, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "title_test.flux", Source: "t_string_title", Start: ast.Position{ Column: 112, Line: 39, }, }, }, Name: "t_string_title", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 39, }, File: "title_test.flux", Source: "test _string_title = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_title})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "title_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "title_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "title_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "title_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "title_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "title_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "title_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toLower_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2cotde,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,clnsknmi ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13f2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_toLower = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toLower(v: r._value)}),\n )\n\ntest _string_toLower = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toLower})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toLower_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "toLower_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toLower_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toLower_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toLower_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "toLower_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "toLower_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "toLower_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "toLower_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2cotde,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,clnsknmi ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13f2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "toLower_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "toLower_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2cotde,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,clnsknmi ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13f2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2cotde,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,clnsknmi ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13f2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toLower_test.flux", Source: "t_string_toLower = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toLower(v: r._value)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 33, }, File: "toLower_test.flux", Source: "t_string_toLower", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_toLower", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toLower_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toLower(v: r._value)}),\n )", Start: ast.Position{ Column: 20, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 33, }, File: "toLower_test.flux", Source: "table", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "toLower_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "toLower_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "toLower_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "toLower_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "toLower_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "toLower_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "toLower_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toLower_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toLower(v: r._value)}),\n )", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toLower_test.flux", Source: "fn: (r) => ({r with _value: strings.toLower(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toLower_test.flux", Source: "fn: (r) => ({r with _value: strings.toLower(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "toLower_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toLower_test.flux", Source: "(r) => ({r with _value: strings.toLower(v: r._value)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toLower_test.flux", Source: "({r with _value: strings.toLower(v: r._value)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "toLower_test.flux", Source: "{r with _value: strings.toLower(v: r._value)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "toLower_test.flux", Source: "_value: strings.toLower(v: r._value)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 36, }, File: "toLower_test.flux", Source: "_value", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toLower_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toLower_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "toLower_test.flux", Source: "v", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toLower_test.flux", Source: "r._value", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 57, Line: 36, }, File: "toLower_test.flux", Source: "r", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toLower_test.flux", Source: "_value", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "toLower_test.flux", Source: "strings.toLower(v: r._value)", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "toLower_test.flux", Source: "strings.toLower", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 36, }, File: "toLower_test.flux", Source: "strings", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "toLower_test.flux", Source: "toLower", Start: ast.Position{ Column: 45, Line: 36, }, }, }, Name: "toLower", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "toLower_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "toLower_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "toLower_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toLower_test.flux", Source: "map(\n fn: (r) => ({r with _value: strings.toLower(v: r._value)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "toLower_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "toLower_test.flux", Source: "table=<-", Start: ast.Position{ Column: 21, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 33, }, File: "toLower_test.flux", Source: "table", Start: ast.Position{ Column: 21, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "toLower_test.flux", Source: "<-", Start: ast.Position{ Column: 27, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toLower_test.flux", Source: "_string_toLower = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toLower})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 39, }, File: "toLower_test.flux", Source: "_string_toLower", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_toLower", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toLower_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toLower})", Start: ast.Position{ Column: 24, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toLower_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toLower})", Start: ast.Position{ Column: 30, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 131, Line: 39, }, File: "toLower_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toLower}", Start: ast.Position{ Column: 31, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 71, Line: 39, }, File: "toLower_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 32, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 39, }, File: "toLower_test.flux", Source: "input", Start: ast.Position{ Column: 32, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "toLower_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "toLower_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 39, }, File: "toLower_test.flux", Source: "csv", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "toLower_test.flux", Source: "inData", Start: ast.Position{ Column: 64, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 71, Line: 39, }, File: "toLower_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "toLower_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 39, }, File: "toLower_test.flux", Source: "testing", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "toLower_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 47, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "toLower_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 73, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 77, Line: 39, }, File: "toLower_test.flux", Source: "want", Start: ast.Position{ Column: 73, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "toLower_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "toLower_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 39, }, File: "toLower_test.flux", Source: "csv", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "toLower_test.flux", Source: "outData", Start: ast.Position{ Column: 100, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "toLower_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "toLower_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 39, }, File: "toLower_test.flux", Source: "testing", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "toLower_test.flux", Source: "loadMem", Start: ast.Position{ Column: 87, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "toLower_test.flux", Source: "fn: t_string_toLower", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 39, }, File: "toLower_test.flux", Source: "fn", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "toLower_test.flux", Source: "t_string_toLower", Start: ast.Position{ Column: 114, Line: 39, }, }, }, Name: "t_string_toLower", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toLower_test.flux", Source: "test _string_toLower = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toLower})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "toLower_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "toLower_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "toLower_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "toLower_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "toLower_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "toLower_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "toLower_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toUpper_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9N GM,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDE,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLNSKNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_toUpper = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toUpper(v: r._value)}),\n )\n\ntest _string_toUpper = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toUpper})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toUpper_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "toUpper_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toUpper_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toUpper_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "toUpper_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "toUpper_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "toUpper_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "toUpper_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z,cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "toUpper_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9N GM,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDE,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLNSKNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "toUpper_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "toUpper_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9N GM,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDE,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLNSKNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,A,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,K9N GM,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,B ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDE,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,CLNSKNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toUpper_test.flux", Source: "t_string_toUpper = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toUpper(v: r._value)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 33, }, File: "toUpper_test.flux", Source: "t_string_toUpper", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_toUpper", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toUpper_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toUpper(v: r._value)}),\n )", Start: ast.Position{ Column: 20, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 33, }, File: "toUpper_test.flux", Source: "table", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "toUpper_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "toUpper_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "toUpper_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "toUpper_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "toUpper_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "toUpper_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "toUpper_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toUpper_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.toUpper(v: r._value)}),\n )", Start: ast.Position{ Column: 34, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toUpper_test.flux", Source: "fn: (r) => ({r with _value: strings.toUpper(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toUpper_test.flux", Source: "fn: (r) => ({r with _value: strings.toUpper(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "toUpper_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toUpper_test.flux", Source: "(r) => ({r with _value: strings.toUpper(v: r._value)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "toUpper_test.flux", Source: "({r with _value: strings.toUpper(v: r._value)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "toUpper_test.flux", Source: "{r with _value: strings.toUpper(v: r._value)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "toUpper_test.flux", Source: "_value: strings.toUpper(v: r._value)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 36, }, File: "toUpper_test.flux", Source: "_value", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toUpper_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toUpper_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "toUpper_test.flux", Source: "v", Start: ast.Position{ Column: 53, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toUpper_test.flux", Source: "r._value", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 57, Line: 36, }, File: "toUpper_test.flux", Source: "r", Start: ast.Position{ Column: 56, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 64, Line: 36, }, File: "toUpper_test.flux", Source: "_value", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 65, Line: 36, }, File: "toUpper_test.flux", Source: "strings.toUpper(v: r._value)", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "toUpper_test.flux", Source: "strings.toUpper", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 36, }, File: "toUpper_test.flux", Source: "strings", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 36, }, File: "toUpper_test.flux", Source: "toUpper", Start: ast.Position{ Column: 45, Line: 36, }, }, }, Name: "toUpper", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "toUpper_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "toUpper_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "toUpper_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "toUpper_test.flux", Source: "map(\n fn: (r) => ({r with _value: strings.toUpper(v: r._value)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "toUpper_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "toUpper_test.flux", Source: "table=<-", Start: ast.Position{ Column: 21, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 33, }, File: "toUpper_test.flux", Source: "table", Start: ast.Position{ Column: 21, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 33, }, File: "toUpper_test.flux", Source: "<-", Start: ast.Position{ Column: 27, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toUpper_test.flux", Source: "_string_toUpper = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toUpper})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 39, }, File: "toUpper_test.flux", Source: "_string_toUpper", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_toUpper", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toUpper_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toUpper})", Start: ast.Position{ Column: 24, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toUpper_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toUpper})", Start: ast.Position{ Column: 30, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 131, Line: 39, }, File: "toUpper_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toUpper}", Start: ast.Position{ Column: 31, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 71, Line: 39, }, File: "toUpper_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 32, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 39, }, File: "toUpper_test.flux", Source: "input", Start: ast.Position{ Column: 32, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "toUpper_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "toUpper_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 39, }, File: "toUpper_test.flux", Source: "csv", Start: ast.Position{ Column: 59, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 39, }, File: "toUpper_test.flux", Source: "inData", Start: ast.Position{ Column: 64, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 71, Line: 39, }, File: "toUpper_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "toUpper_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 39, }, File: "toUpper_test.flux", Source: "testing", Start: ast.Position{ Column: 39, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 39, }, File: "toUpper_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 47, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "toUpper_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 73, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 77, Line: 39, }, File: "toUpper_test.flux", Source: "want", Start: ast.Position{ Column: 73, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "toUpper_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "toUpper_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 39, }, File: "toUpper_test.flux", Source: "csv", Start: ast.Position{ Column: 95, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 39, }, File: "toUpper_test.flux", Source: "outData", Start: ast.Position{ Column: 100, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 39, }, File: "toUpper_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "toUpper_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 86, Line: 39, }, File: "toUpper_test.flux", Source: "testing", Start: ast.Position{ Column: 79, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 94, Line: 39, }, File: "toUpper_test.flux", Source: "loadMem", Start: ast.Position{ Column: 87, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "toUpper_test.flux", Source: "fn: t_string_toUpper", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 39, }, File: "toUpper_test.flux", Source: "fn", Start: ast.Position{ Column: 110, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 39, }, File: "toUpper_test.flux", Source: "t_string_toUpper", Start: ast.Position{ Column: 114, Line: 39, }, }, }, Name: "t_string_toUpper", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 132, Line: 39, }, File: "toUpper_test.flux", Source: "test _string_toUpper = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_toUpper})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "toUpper_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "toUpper_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "toUpper_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "toUpper_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "toUpper_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "toUpper_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "toUpper_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "trim_test.flux", Source: "package strings_test\n\n\nimport \"testing\"\nimport \"strings\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z, k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z, 2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z, cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n\"\nt_string_trim = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.trimSpace(v: r._value)}),\n )\n\ntest _string_trim = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_trim})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "trim_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 7, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 7, }, File: "trim_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 7, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "trim_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 7, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "trim_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 7, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 7, }, File: "trim_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 7, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "trim_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z, k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z, 2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z, cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 9, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 9, }, File: "trim_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 9, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 20, }, File: "trim_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z, k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z, 2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z, cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 10, Line: 9, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:36Z, k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:46Z,b ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:56Z, 2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:06Z, cLnSkNMI ,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:54:16Z,13F2 ,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "trim_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 1, Line: 21, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 21, }, File: "trim_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 21, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 32, }, File: "trim_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n\"", Start: ast.Position{ Column: 11, Line: 21, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string\n#group,false,false,true,true,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,,,\n,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:26Z,a,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:36Z,k9n gm,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:46Z,b,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:53:56Z,2COTDe,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:06Z,cLnSkNMI,used_percent,disk,disk1,apfs,host.local,/\n,,0,2018-05-22T19:53:26Z,2030-01-01T00:00:00Z,2018-05-22T19:54:16Z,13F2,used_percent,disk,disk1,apfs,host.local,/\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "trim_test.flux", Source: "t_string_trim = (table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.trimSpace(v: r._value)}),\n )", Start: ast.Position{ Column: 1, Line: 33, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 33, }, File: "trim_test.flux", Source: "t_string_trim", Start: ast.Position{ Column: 1, Line: 33, }, }, }, Name: "t_string_trim", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "trim_test.flux", Source: "(table=<-) => table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.trimSpace(v: r._value)}),\n )", Start: ast.Position{ Column: 17, Line: 33, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 33, }, File: "trim_test.flux", Source: "table", Start: ast.Position{ Column: 31, Line: 33, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "trim_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 31, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "trim_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "trim_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 34, }, File: "trim_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 34, }, }, }, Name: "start", }, Separator: nil, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 34, }, File: "trim_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 21, Line: 34, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 34, }, File: "trim_test.flux", Source: "range(start: 2018-05-22T19:53:26Z)", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 34, }, File: "trim_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 34, }, }, }, Name: "range", }, Lparen: nil, Rparen: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "trim_test.flux", Source: "table\n |> range(start: 2018-05-22T19:53:26Z)\n |> map(\n fn: (r) => ({r with _value: strings.trimSpace(v: r._value)}),\n )", Start: ast.Position{ Column: 31, Line: 33, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 36, }, File: "trim_test.flux", Source: "fn: (r) => ({r with _value: strings.trimSpace(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 36, }, File: "trim_test.flux", Source: "fn: (r) => ({r with _value: strings.trimSpace(v: r._value)})", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 36, }, File: "trim_test.flux", Source: "fn", Start: ast.Position{ Column: 9, Line: 36, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 36, }, File: "trim_test.flux", Source: "(r) => ({r with _value: strings.trimSpace(v: r._value)})", Start: ast.Position{ Column: 13, Line: 36, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 36, }, File: "trim_test.flux", Source: "({r with _value: strings.trimSpace(v: r._value)})", Start: ast.Position{ Column: 20, Line: 36, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 36, }, File: "trim_test.flux", Source: "{r with _value: strings.trimSpace(v: r._value)}", Start: ast.Position{ Column: 21, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "trim_test.flux", Source: "_value: strings.trimSpace(v: r._value)", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 36, }, File: "trim_test.flux", Source: "_value", Start: ast.Position{ Column: 29, Line: 36, }, }, }, Name: "_value", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "trim_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "trim_test.flux", Source: "v: r._value", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 56, Line: 36, }, File: "trim_test.flux", Source: "v", Start: ast.Position{ Column: 55, Line: 36, }, }, }, Name: "v", }, Separator: nil, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "trim_test.flux", Source: "r._value", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 59, Line: 36, }, File: "trim_test.flux", Source: "r", Start: ast.Position{ Column: 58, Line: 36, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 36, }, File: "trim_test.flux", Source: "_value", Start: ast.Position{ Column: 60, Line: 36, }, }, }, Name: "_value", }, Rbrack: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 36, }, File: "trim_test.flux", Source: "strings.trimSpace(v: r._value)", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "trim_test.flux", Source: "strings.trimSpace", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 36, }, File: "trim_test.flux", Source: "strings", Start: ast.Position{ Column: 37, Line: 36, }, }, }, Name: "strings", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 54, Line: 36, }, File: "trim_test.flux", Source: "trimSpace", Start: ast.Position{ Column: 45, Line: 36, }, }, }, Name: "trimSpace", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }}, Rbrace: nil, With: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 36, }, File: "trim_test.flux", Source: "r", Start: ast.Position{ Column: 22, Line: 36, }, }, }, Name: "r", }, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "trim_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 36, }, File: "trim_test.flux", Source: "r", Start: ast.Position{ Column: 14, Line: 36, }, }, }, Name: "r", }, Separator: nil, Value: nil, }}, Rparan: nil, }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 37, }, File: "trim_test.flux", Source: "map(\n fn: (r) => ({r with _value: strings.trimSpace(v: r._value)}),\n )", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 35, }, File: "trim_test.flux", Source: "map", Start: ast.Position{ Column: 8, Line: 35, }, }, }, Name: "map", }, Lparen: nil, Rparen: nil, }, }, Lparen: nil, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 33, }, File: "trim_test.flux", Source: "table=<-", Start: ast.Position{ Column: 18, Line: 33, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 33, }, File: "trim_test.flux", Source: "table", Start: ast.Position{ Column: 18, Line: 33, }, }, }, Name: "table", }, Separator: nil, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 33, }, File: "trim_test.flux", Source: "<-", Start: ast.Position{ Column: 24, Line: 33, }, }, }}, }}, Rparan: nil, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "trim_test.flux", Source: "_string_trim = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_trim})", Start: ast.Position{ Column: 6, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 39, }, File: "trim_test.flux", Source: "_string_trim", Start: ast.Position{ Column: 6, Line: 39, }, }, }, Name: "_string_trim", }, Init: &ast.FunctionExpression{ Arrow: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "trim_test.flux", Source: "() => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_trim})", Start: ast.Position{ Column: 21, Line: 39, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "trim_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_trim})", Start: ast.Position{ Column: 27, Line: 39, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 125, Line: 39, }, File: "trim_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_trim}", Start: ast.Position{ Column: 28, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 39, }, File: "trim_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 29, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 39, }, File: "trim_test.flux", Source: "input", Start: ast.Position{ Column: 29, Line: 39, }, }, }, Name: "input", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "trim_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 56, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "trim_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 56, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 59, Line: 39, }, File: "trim_test.flux", Source: "csv", Start: ast.Position{ Column: 56, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 39, }, File: "trim_test.flux", Source: "inData", Start: ast.Position{ Column: 61, Line: 39, }, }, }, Name: "inData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 39, }, File: "trim_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 36, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 55, Line: 39, }, File: "trim_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 36, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 39, }, File: "trim_test.flux", Source: "testing", Start: ast.Position{ Column: 36, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 55, Line: 39, }, File: "trim_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 44, Line: 39, }, }, }, Name: "loadStorage", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 39, }, File: "trim_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 70, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 74, Line: 39, }, File: "trim_test.flux", Source: "want", Start: ast.Position{ Column: 70, Line: 39, }, }, }, Name: "want", }, Separator: nil, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "trim_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 92, Line: 39, }, }, }, Lbrace: nil, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "trim_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 92, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 95, Line: 39, }, File: "trim_test.flux", Source: "csv", Start: ast.Position{ Column: 92, Line: 39, }, }, }, Name: "csv", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 39, }, File: "trim_test.flux", Source: "outData", Start: ast.Position{ Column: 97, Line: 39, }, }, }, Name: "outData", }, }}, Rbrace: nil, With: nil, }}, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 39, }, File: "trim_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 76, Line: 39, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 91, Line: 39, }, File: "trim_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 76, Line: 39, }, }, }, Lbrack: nil, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 83, Line: 39, }, File: "trim_test.flux", Source: "testing", Start: ast.Position{ Column: 76, Line: 39, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 91, Line: 39, }, File: "trim_test.flux", Source: "loadMem", Start: ast.Position{ Column: 84, Line: 39, }, }, }, Name: "loadMem", }, Rbrack: nil, }, Lparen: nil, Rparen: nil, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "trim_test.flux", Source: "fn: t_string_trim", Start: ast.Position{ Column: 107, Line: 39, }, }, }, Comma: nil, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 109, Line: 39, }, File: "trim_test.flux", Source: "fn", Start: ast.Position{ Column: 107, Line: 39, }, }, }, Name: "fn", }, Separator: nil, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 124, Line: 39, }, File: "trim_test.flux", Source: "t_string_trim", Start: ast.Position{ Column: 111, Line: 39, }, }, }, Name: "t_string_trim", }, }}, Rbrace: nil, With: nil, }, Lparen: nil, Rparen: nil, }, Lparen: nil, Params: []*ast.Property{}, Rparan: nil, }, }, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 126, Line: 39, }, File: "trim_test.flux", Source: "test _string_trim = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_string_trim})", Start: ast.Position{ Column: 1, Line: 39, }, }, }, }}, Eof: nil, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "trim_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 4, }, File: "trim_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "trim_test.flux", Source: "import \"strings\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 5, }, File: "trim_test.flux", Source: "\"strings\"", Start: ast.Position{ Column: 8, Line: 5, }, }, }, Value: "strings", }, }}, Metadata: "parser-type=rust", Name: "trim_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "trim_test.flux", Source: "package strings_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Comments: nil, Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 1, }, File: "trim_test.flux", Source: "strings_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "strings_test", }, }, }}, Package: "strings_test", Path: "strings", }}
View Source
var SpecialFns map[string]values.Function
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.