diff --git a/compiler/ztests/aggregate.yaml b/compiler/ztests/aggregate.yaml index cef4e71c38..37620351f7 100644 --- a/compiler/ztests/aggregate.yaml +++ b/compiler/ztests/aggregate.yaml @@ -5,7 +5,5 @@ input: | {_path:"dns"} {_path:"conn"} -output-flags: -pretty=0 - output: | 2 diff --git a/compiler/ztests/pragma-index-base-slice.yaml b/compiler/ztests/pragma-index-base-slice.yaml index 8d1d977e62..3563b1ae6d 100644 --- a/compiler/ztests/pragma-index-base-slice.yaml +++ b/compiler/ztests/pragma-index-base-slice.yaml @@ -12,7 +12,7 @@ spq: | ) | sort s -input-flags: -dynamic +flags: -dynamic input: | {a:[1,2,3],from:1,to:3} diff --git a/compiler/ztests/summarize.yaml b/compiler/ztests/summarize.yaml index 8d642d44ad..65b461400a 100644 --- a/compiler/ztests/summarize.yaml +++ b/compiler/ztests/summarize.yaml @@ -5,7 +5,5 @@ input: | {_path:"dns"} {_path:"conn"} -output-flags: -pretty=0 - output: | 2 diff --git a/runtime/sam/expr/expr_test.go b/runtime/sam/expr/expr_test.go index 46eae048ad..8f0be471df 100644 --- a/runtime/sam/expr/expr_test.go +++ b/runtime/sam/expr/expr_test.go @@ -15,10 +15,10 @@ func testSuccessful(t *testing.T, e, input, expected string) { input = "{}" } zt := ztest.ZTest{ - SPQ: fmt.Sprintf("values %s", e), - Input: &input, - InputFlags: "-dynamic", - Output: expected + "\n", + SPQ: fmt.Sprintf("values %s", e), + Flags: "-dynamic", + Input: &input, + Output: expected + "\n", } if err := zt.RunInternal(t.Context()); err != nil { t.Fatal(err) diff --git a/runtime/ztests/expr/arith-errors.yaml b/runtime/ztests/expr/arith-errors.yaml index b1854f6274..b874fc6c84 100644 --- a/runtime/ztests/expr/arith-errors.yaml +++ b/runtime/ztests/expr/arith-errors.yaml @@ -24,7 +24,7 @@ output: | spq: this+1 -input-flags: -dynamic +flags: -dynamic input: | none diff --git a/runtime/ztests/expr/array-bounds-2.yaml b/runtime/ztests/expr/array-bounds-2.yaml index 2718ffbe9b..2db78acc00 100644 --- a/runtime/ztests/expr/array-bounds-2.yaml +++ b/runtime/ztests/expr/array-bounds-2.yaml @@ -1,6 +1,6 @@ spq: cut m1:=is_error(a[-1]),m2:=is_error(a[4]) -input-flags: -dynamic +flags: -dynamic input: | {x:[1,2,3],i:1::uint16} diff --git a/runtime/ztests/expr/array-bounds.yaml b/runtime/ztests/expr/array-bounds.yaml index 3e6b90c906..6f35792dd9 100644 --- a/runtime/ztests/expr/array-bounds.yaml +++ b/runtime/ztests/expr/array-bounds.yaml @@ -1,6 +1,6 @@ spq: put b:=is_error(a[2]) -input-flags: -dynamic +flags: -dynamic input: | {a:[1,2,3]} diff --git a/runtime/ztests/expr/dot-record-type.yaml b/runtime/ztests/expr/dot-record-type.yaml index f9c8f243ac..7c3cc56624 100644 --- a/runtime/ztests/expr/dot-record-type.yaml +++ b/runtime/ztests/expr/dot-record-type.yaml @@ -1,6 +1,6 @@ spq: values foo, foo.bar -input-flags: -dynamic +flags: -dynamic input: | <{foo:{bar:int64}}> diff --git a/runtime/ztests/expr/filter-null-with-nonexistent-field.yaml b/runtime/ztests/expr/filter-null-with-nonexistent-field.yaml index 74d8b91087..7d7316a64b 100644 --- a/runtime/ztests/expr/filter-null-with-nonexistent-field.yaml +++ b/runtime/ztests/expr/filter-null-with-nonexistent-field.yaml @@ -1,6 +1,6 @@ spq: is_error(t) -input-flags: -dynamic +flags: -dynamic input: &input | {s:"A=B"} diff --git a/runtime/ztests/expr/function/parse-uri.yaml b/runtime/ztests/expr/function/parse-uri.yaml index cec1d1befc..e7f7046409 100644 --- a/runtime/ztests/expr/function/parse-uri.yaml +++ b/runtime/ztests/expr/function/parse-uri.yaml @@ -1,5 +1,7 @@ spq: uri := parse_uri(s) +flags: -pretty 2 + input: | {s:""} {s:"scheme://user:password@host:12345/path?a=1&a=2&b=3&c=#fragment"} @@ -10,8 +12,6 @@ input: | {s:":no-scheme"} {s:"scheme://bad-port:1234567"} -output-flags: -pretty=2 - output: | { s: "", diff --git a/runtime/ztests/expr/function/upcast.yaml b/runtime/ztests/expr/function/upcast.yaml index b5ac8806d1..e466721ba7 100644 --- a/runtime/ztests/expr/function/upcast.yaml +++ b/runtime/ztests/expr/function/upcast.yaml @@ -12,6 +12,8 @@ output: | spq: | upcast(this[0], this[1]) +flags: -fusion + input: | [[1,"a"],<[int8|string]>] [[1::int8,"a"],<[int8|string]>] @@ -59,8 +61,6 @@ input: | type n101=int64 [1::n101,] -output-flags: -fusion - output: | error({message:"upcast: value not a subtype of [int8|string]",on:[1,"a"]}) [1::int8,"a"] diff --git a/runtime/ztests/expr/fusion-all.yaml b/runtime/ztests/expr/fusion-all.yaml index 87d37905de..1ced1e6c39 100644 --- a/runtime/ztests/expr/fusion-all.yaml +++ b/runtime/ztests/expr/fusion-all.yaml @@ -1,5 +1,7 @@ spq: upcast(this,) +flags: -fusion + # note: the syntax for fusion values will change from bytes to values soon # and this test will be updated @@ -9,8 +11,6 @@ input: | {x:1} -output-flags: -fusion - output: | 1::any "foo"::any diff --git a/runtime/ztests/expr/math-incompatible.yaml b/runtime/ztests/expr/math-incompatible.yaml index f604e4659f..83733718bd 100644 --- a/runtime/ztests/expr/math-incompatible.yaml +++ b/runtime/ztests/expr/math-incompatible.yaml @@ -1,7 +1,7 @@ spq: | values a+b, a-b, a*b, a/b, a%b -input-flags: -dynamic +flags: -dynamic input: | {a:[1,2],b:[3,4]} diff --git a/runtime/ztests/expr/rec-expr-opt.yaml b/runtime/ztests/expr/rec-expr-opt.yaml index dd40d1075d..f5849c7fb9 100644 --- a/runtime/ztests/expr/rec-expr-opt.yaml +++ b/runtime/ztests/expr/rec-expr-opt.yaml @@ -57,7 +57,7 @@ output: | spq: values {x?:this} -input-flags: -dynamic +flags: -dynamic input: | none diff --git a/runtime/ztests/expr/slice-array.yaml b/runtime/ztests/expr/slice-array.yaml index 973eea6d68..af359a356a 100644 --- a/runtime/ztests/expr/slice-array.yaml +++ b/runtime/ztests/expr/slice-array.yaml @@ -1,6 +1,6 @@ spq: "values c[start:end]" -input-flags: -dynamic +flags: -dynamic input: | {start:null,end:-1,c:[1,2,3,4]} diff --git a/runtime/ztests/expr/slice-set.yaml b/runtime/ztests/expr/slice-set.yaml index 850a0fc13d..51cd24952b 100644 --- a/runtime/ztests/expr/slice-set.yaml +++ b/runtime/ztests/expr/slice-set.yaml @@ -1,6 +1,6 @@ spq: "values c[start:end]" -input-flags: -dynamic +flags: -dynamic input: | {start:null,end:-1,c:set[1,2,3,4]} diff --git a/runtime/ztests/expr/slice.yaml b/runtime/ztests/expr/slice.yaml index d7bef27e90..c8b7ad3a5f 100644 --- a/runtime/ztests/expr/slice.yaml +++ b/runtime/ztests/expr/slice.yaml @@ -1,6 +1,6 @@ spq: "cut a1:=a[1:-1],a2:=a[1:],a3:=a[:1],a4:=a[:-1],a5:=a[:-100],a6:=a[-1:],a7:=a[-2:-1],a8:=(a IS NOT NULL and len(a)>0) ? a[:a[1]-9] : null" -input-flags: -dynamic +flags: -dynamic input: | {a:null} @@ -31,7 +31,7 @@ output: | # Test slice on union and fusion values spq: this[1:] -input-flags: -dynamic +flags: -dynamic input: | [1,2,3]::(null|[int64]) diff --git a/runtime/ztests/op/aggregate/collect_map.yaml b/runtime/ztests/op/aggregate/collect_map.yaml index 6db2387dae..fa09789e1d 100644 --- a/runtime/ztests/op/aggregate/collect_map.yaml +++ b/runtime/ztests/op/aggregate/collect_map.yaml @@ -1,6 +1,6 @@ spq: "collect_map(map{stock: price})" -output-flags: -pretty 2 +flags: -pretty 2 input: | {stock:"APPL",price:150.94} @@ -24,7 +24,7 @@ output: | # Test union values spq: "collect_map(map{k:v})" -output-flags: -pretty 2 +flags: -pretty 2 input: | // Named type and union type. diff --git a/runtime/ztests/op/aggregate/count-assign.yaml b/runtime/ztests/op/aggregate/count-assign.yaml index b8c885d6c2..d9d1d8521b 100644 --- a/runtime/ztests/op/aggregate/count-assign.yaml +++ b/runtime/ztests/op/aggregate/count-assign.yaml @@ -1,5 +1,7 @@ spq: c:=count() +flags: -f table + input: | {_path:"conn",foo:"1"} {_path:"conn",foo:"2"} @@ -12,8 +14,6 @@ input: | {_path:"conn",foo:"9"} {_path:"conn",foo:"10"} -output-flags: -f table - output: | c 10 diff --git a/runtime/ztests/op/aggregate/named-values.yaml b/runtime/ztests/op/aggregate/named-values.yaml index b6577a9963..a6a201e480 100644 --- a/runtime/ztests/op/aggregate/named-values.yaml +++ b/runtime/ztests/op/aggregate/named-values.yaml @@ -1,12 +1,12 @@ spq: count(), sum(this), min(this), max(this), avg(this), collect(this), any(this), dcount(this) +flags: -pretty 4 + input: | type named=int64 1::named 2::named -output-flags: -pretty=4 - output: | type named = int64 { diff --git a/runtime/ztests/op/aggregate/not-present.yaml b/runtime/ztests/op/aggregate/not-present.yaml index 7bb9077517..4a6b0b9fab 100644 --- a/runtime/ztests/op/aggregate/not-present.yaml +++ b/runtime/ztests/op/aggregate/not-present.yaml @@ -1,6 +1,6 @@ spq: max(val) by key | sort -input-flags: -dynamic +flags: -dynamic input: | {key:"key1"} diff --git a/runtime/ztests/op/cut-foo-bar-only.yaml b/runtime/ztests/op/cut-foo-bar-only.yaml index 26a07e640d..6b8439af23 100644 --- a/runtime/ztests/op/cut-foo-bar-only.yaml +++ b/runtime/ztests/op/cut-foo-bar-only.yaml @@ -1,6 +1,6 @@ spq: cut foo -input-flags: -dynamic +flags: -dynamic input: | {bar:"bar1"} diff --git a/runtime/ztests/op/drop-boo.yaml b/runtime/ztests/op/drop-boo.yaml index 85943f5502..6d633806c9 100644 --- a/runtime/ztests/op/drop-boo.yaml +++ b/runtime/ztests/op/drop-boo.yaml @@ -1,6 +1,6 @@ spq: drop boo -input-flags: -dynamic +flags: -dynamic input: &input | {foo:"foo1"} diff --git a/runtime/ztests/op/drop-non-record.yaml b/runtime/ztests/op/drop-non-record.yaml index 8d81642503..de432455ce 100644 --- a/runtime/ztests/op/drop-non-record.yaml +++ b/runtime/ztests/op/drop-non-record.yaml @@ -1,6 +1,6 @@ spq: drop x -input-flags: -dynamic +flags: -dynamic input: | 1 diff --git a/runtime/ztests/op/fuse.yaml b/runtime/ztests/op/fuse.yaml index 2e13571392..385494300d 100644 --- a/runtime/ztests/op/fuse.yaml +++ b/runtime/ztests/op/fuse.yaml @@ -1,13 +1,13 @@ spq: fuse +flags: -fusion + input: | {a:"hello",b:"world"} {b:"goodnight",c:"gracie"} {a:"goodnight",b:123::int32} {a:null,b:null,c:null} -output-flags: -fusion - output: | fusion({a:fusion("hello"::(string|null|none),),b:fusion("world"::(int32|string|null),),c:fusion(none::(string|null|none),)},<{a:string,b:string}>) fusion({a:fusion(none::(string|null|none),),b:fusion("goodnight"::(int32|string|null),),c:fusion("gracie"::(string|null|none),)},<{b:string,c:string}>) @@ -19,6 +19,8 @@ output: | # Test fuse on an array of records. spq: fuse +flags: -fusion + input: | [{a:1}] [{b:2}] @@ -26,8 +28,6 @@ input: | [{a:3,b:3}] [{a:null,b:null}] -output-flags: -fusion - output: | fusion([fusion({a:fusion(1::(int64|null|none),),b:fusion(none::(int64|null|none),)},<{a:int64}>)],<[{a:int64}]>) fusion([fusion({a:fusion(none::(int64|null|none),),b:fusion(2::(int64|null|none),)},<{b:int64}>)],<[{b:int64}]>) @@ -40,6 +40,8 @@ output: | # Test fuse on mix of complex and primitive values. spq: fuse +flags: -fusion + input: | {a:1} {a:"s"} @@ -48,8 +50,6 @@ input: | [1] ["s"] -output-flags: -fusion - output: | fusion({a:fusion(1::(int64|string),)}::(int64|string|{a:fusion(int64|string)}|[fusion(int64|string)]),<{a:int64}>) fusion({a:fusion("s"::(int64|string),)}::(int64|string|{a:fusion(int64|string)}|[fusion(int64|string)]),<{a:string}>) @@ -63,13 +63,13 @@ output: | # Test fuse on nested records. spq: fuse +flags: -fusion + input: | {a:"hello",r:{x:1::int32,y:2::int32}} {r:{y:4::int32,z:5::int32},s:"world",r2:{x:6::int32}} {a:null,r:{x:null,y:null,z:null},s:null,r2:null} -output-flags: -fusion - output: | fusion({a:fusion("hello"::(string|null|none),),r:fusion({x:fusion(1::int32::(int32|null|none),),y:fusion(2::int32::(int32|null),),z:fusion(none::(int32|null|none),)},<{x:int32,y:int32}>),s:fusion(none::(string|null|none),),r2:fusion(none::(null|none|{x:int32}),)},<{a:string,r:{x:int32,y:int32}}>) fusion({a:fusion(none::(string|null|none),),r:fusion({x:fusion(none::(int32|null|none),),y:fusion(4::int32::(int32|null),),z:fusion(5::int32::(int32|null|none),)},<{y:int32,z:int32}>),s:fusion("world"::(string|null|none),),r2:fusion({x:6::int32}::(null|none|{x:int32}),<{x:int32}>)},<{r:{y:int32,z:int32},s:string,r2:{x:int32}}>) @@ -79,12 +79,12 @@ output: | spq: fuse +flags: -fusion + input: | error(1) error("s") -output-flags: -fusion - output: | fusion(error(fusion(1::(int64|string),)),) fusion(error(fusion("s"::(int64|string),)),) @@ -93,13 +93,13 @@ output: | spq: fuse +flags: -fusion + input: | [1,2] ["foo"] [null] -output-flags: -fusion - output: | fusion([fusion(1::(int64|string|null),),fusion(2::(int64|string|null),)],<[int64]>) fusion([fusion("foo"::(int64|string|null),)],<[string]>) @@ -109,13 +109,13 @@ output: | spq: fuse +flags: -fusion + input: | {a:[1,2]} {a:["foo"]} {a:[null]} -output-flags: -fusion - output: | {a:fusion([fusion(1::(int64|string|null),),fusion(2::(int64|string|null),)],<[int64]>)} {a:fusion([fusion("foo"::(int64|string|null),)],<[string]>)} @@ -125,6 +125,8 @@ output: | spq: fuse +flags: -fusion + input: | type p1=int64 1::p1 @@ -151,8 +153,6 @@ input: | type er2=error(er1) error(1)::er2 -output-flags: -fusion - output: | type a1=int64 type a2=[a1] @@ -200,12 +200,12 @@ output: | spq: fuse | values x +flags: -fusion + input: | {x:{y:1}} {} -output-flags: -fusion - output: | fusion({y:1}::(none|{y:int64}),<{y:int64}>) error({message:"no such field x",on:{}}) diff --git a/runtime/ztests/op/rename-non-record.yaml b/runtime/ztests/op/rename-non-record.yaml index 10e3e3a175..118f318f9f 100644 --- a/runtime/ztests/op/rename-non-record.yaml +++ b/runtime/ztests/op/rename-non-record.yaml @@ -1,6 +1,6 @@ spq: rename a := b -input-flags: -dynamic +flags: -dynamic input: | 1 diff --git a/runtime/ztests/op/unnest.yaml b/runtime/ztests/op/unnest.yaml index 1bc29fe05d..c05f85c5ac 100644 --- a/runtime/ztests/op/unnest.yaml +++ b/runtime/ztests/op/unnest.yaml @@ -51,7 +51,7 @@ output: | # Unnest on fusion values spq: unnest this -input-flags: -dynamic +flags: -dynamic input: | fusion({x:"foo",y:[1,2],z?:none::int64},<{x:string,y:[int64]}>) diff --git a/sio/csvio/ztests/bool.yaml b/sio/csvio/ztests/bool.yaml index ac29ba5626..72bbbeea4c 100644 --- a/sio/csvio/ztests/bool.yaml +++ b/sio/csvio/ztests/bool.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv + input: | {bool:false} {bool:true} -output-flags: -f csv - output: | bool false diff --git a/sio/csvio/ztests/bytes.yaml b/sio/csvio/ztests/bytes.yaml index 63894801c8..b4254db81d 100644 --- a/sio/csvio/ztests/bytes.yaml +++ b/sio/csvio/ztests/bytes.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv + input: | {bytes:0x} {bytes:0x68656c6c6f0a} -output-flags: -f csv - output: | bytes diff --git a/sio/csvio/ztests/different-types.yaml b/sio/csvio/ztests/different-types.yaml index 05b7dfe56d..fa4fa4de63 100644 --- a/sio/csvio/ztests/different-types.yaml +++ b/sio/csvio/ztests/different-types.yaml @@ -1,12 +1,12 @@ spq: pass +flags: -f csv + input: | {a:0} {a:"foo"} {a:127.0.0.1} -output-flags: -f csv - output: | a 0 diff --git a/sio/csvio/ztests/duration.yaml b/sio/csvio/ztests/duration.yaml index 507716f249..78847be1c5 100644 --- a/sio/csvio/ztests/duration.yaml +++ b/sio/csvio/ztests/duration.yaml @@ -1,12 +1,12 @@ spq: pass +flags: -f csv + input: | {duration:0s} {duration:-292y171d23h47m16.854775808s} {duration:292y171d23h47m16.854775807s} -output-flags: -f csv - output: | duration 0s diff --git a/sio/csvio/ztests/error.yaml b/sio/csvio/ztests/error.yaml index 3b161e467d..036d59d024 100644 --- a/sio/csvio/ztests/error.yaml +++ b/sio/csvio/ztests/error.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f csv + input: | {error:error(null)} {error:error(1)} @@ -9,8 +11,6 @@ input: | {error:error("\\u002d")} {error:error("\\u005c")} -output-flags: -f csv - output: | error error(null) diff --git a/sio/csvio/ztests/float.yaml b/sio/csvio/ztests/float.yaml index 5509de80b1..840af88c04 100644 --- a/sio/csvio/ztests/float.yaml +++ b/sio/csvio/ztests/float.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f csv + # 1e-45 and 5e-324 are the smallest nonzero float32 and float64. # 3.4028235e+38 and 1.7976931348623157e+308 are the maximum float32 and # float64. @@ -17,8 +19,6 @@ input: | {f16:65504.::float16,f32:3.4028235e+38::float32,f64:1.7976931348623157e+308} {f16:-65504.::float16,f32:-3.4028235e+38::float32,f64:-1.7976931348623157e+308} -output-flags: -f csv - output: | f16,f32,f64 +Inf,+Inf,+Inf diff --git a/sio/csvio/ztests/fusion.yaml b/sio/csvio/ztests/fusion.yaml index b30ecd0c79..1a924820b9 100644 --- a/sio/csvio/ztests/fusion.yaml +++ b/sio/csvio/ztests/fusion.yaml @@ -1,11 +1,11 @@ spq: fuse +flags: -f csv + input: | {x:1} {y:"foo"} -output-flags: -f csv - output: | x 1 diff --git a/sio/csvio/ztests/int.yaml b/sio/csvio/ztests/int.yaml index 7695ff40eb..fb35ab3b59 100644 --- a/sio/csvio/ztests/int.yaml +++ b/sio/csvio/ztests/int.yaml @@ -1,12 +1,12 @@ spq: pass +flags: -f csv + input: | {int8:0::int8,int16:0::int16,int32:0::int32,int64:0} {int8:-128::int8,int16:-32768::int16,int32:-2147483648::int32,int64:-9223372036854775808} {int8:127::int8,int16:32767::int16,int32:2147483647::int32,int64:9223372036854775807} -output-flags: -f csv - output: | int8,int16,int32,int64 0,0,0,0 diff --git a/sio/csvio/ztests/ip.yaml b/sio/csvio/ztests/ip.yaml index 9571ca6432..a03f480f51 100644 --- a/sio/csvio/ztests/ip.yaml +++ b/sio/csvio/ztests/ip.yaml @@ -1,10 +1,10 @@ spq: pass +flags: -f csv + input: | {ip:1.2.3.4} -output-flags: -f csv - output: | ip 1.2.3.4 diff --git a/sio/csvio/ztests/issue-2332.yaml b/sio/csvio/ztests/issue-2332.yaml index b41bbbf1b7..955a5b609f 100644 --- a/sio/csvio/ztests/issue-2332.yaml +++ b/sio/csvio/ztests/issue-2332.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: -i csv +flags: -i csv input: | "Letter", "Frequency", "Percentage" diff --git a/sio/csvio/ztests/named.yaml b/sio/csvio/ztests/named.yaml index 7c4e49970c..a16ad80710 100644 --- a/sio/csvio/ztests/named.yaml +++ b/sio/csvio/ztests/named.yaml @@ -1,13 +1,13 @@ spq: pass +flags: -f csv + input: | type my_int64=int64 type my_inner_record={b:my_int64} type my_outer_record={a:my_inner_record} {a:{b:1::my_int64}::my_inner_record}::my_outer_record -output-flags: -f csv - output: | a.b 1 diff --git a/sio/csvio/ztests/net.yaml b/sio/csvio/ztests/net.yaml index c2c0fc51a1..e1168474c0 100644 --- a/sio/csvio/ztests/net.yaml +++ b/sio/csvio/ztests/net.yaml @@ -1,10 +1,10 @@ spq: pass +flags: -f csv + input: | {net:1.2.3.4/32} -output-flags: -f csv - output: | net 1.2.3.4/32 diff --git a/sio/csvio/ztests/noheader.yaml b/sio/csvio/ztests/noheader.yaml index d6911fe3de..01e4d00b74 100644 --- a/sio/csvio/ztests/noheader.yaml +++ b/sio/csvio/ztests/noheader.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv -noheader + input: | {a:1,b:2} {a:"one",b:"two"} -output-flags: -f csv -noheader - output: | 1,2 one,two diff --git a/sio/csvio/ztests/non-record-error.yaml b/sio/csvio/ztests/non-record-error.yaml index 169d637a02..0fcda7c287 100644 --- a/sio/csvio/ztests/non-record-error.yaml +++ b/sio/csvio/ztests/non-record-error.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv + input: | {a:1} [1,2] -output-flags: -f csv - output: | a 1 diff --git a/sio/csvio/ztests/null.yaml b/sio/csvio/ztests/null.yaml index 199b244a2a..f1d99c9efb 100644 --- a/sio/csvio/ztests/null.yaml +++ b/sio/csvio/ztests/null.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv + input: | {null:null} {null:null} -output-flags: -f csv - output: |+ null diff --git a/sio/csvio/ztests/read-big.yaml b/sio/csvio/ztests/read-big.yaml index b9704dda77..80cab1a9bd 100644 --- a/sio/csvio/ztests/read-big.yaml +++ b/sio/csvio/ztests/read-big.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: -i csv +flags: -i csv -pretty 2 input: | "@timestamp","@version",DestinationHostname,DestinationIsIpv6,DestinationPort,DestinationPortName,Initiated,Protocol,RuleName,SourceHostname,SourceIsIpv6,SourcePort,SourcePortName,"_id","_index","_score","_type","beat_hostname","beat_name","beat_version","dst_ip_addr","dst_ip_public","dst_ip_rfc","dst_ip_type","dst_ip_version","dst_is_ipv6","etl_host_agent_ephemeral_uid","etl_host_agent_type","etl_host_agent_uid","etl_kafka_offset","etl_kafka_partition","etl_kafka_time","etl_kafka_topic","etl_pipeline","etl_processed_time","etl_version","event_id","event_original_message","event_original_time","event_recorded_time","event_timezone","host_name",level,"log_name","meta_dst_ip_geo.as_org","meta_dst_ip_geo.asn","meta_dst_ip_geo.city_name","meta_dst_ip_geo.continent_code","meta_dst_ip_geo.country_code2","meta_dst_ip_geo.country_code3","meta_dst_ip_geo.country_name","meta_dst_ip_geo.dma_code","meta_dst_ip_geo.latitude","meta_dst_ip_geo.location","meta_dst_ip_geo.longitude","meta_dst_ip_geo.postal_code","meta_dst_ip_geo.region_code","meta_dst_ip_geo.region_name","meta_dst_ip_geo.timezone","meta_user_name_is_machine",opcode,"process_guid","process_id","process_name","process_path","provider_guid","record_number","rule_technique_id","rule_technique_name","source_name","src_ip_addr","src_ip_public","src_ip_rfc","src_ip_type","src_ip_version","src_is_ipv6",tags,task,"thread_id",type,"user_account","user_domain","user_name",version,"z_elastic_ecs.ecs.version","z_elastic_ecs.event.action","z_elastic_ecs.event.code","z_elastic_ecs.event.created","z_elastic_ecs.event.kind","z_elastic_ecs.event.provider","z_elastic_ecs.user.domain","z_elastic_ecs.user.identifier","z_elastic_ecs.user.name","z_elastic_ecs.user.type" @@ -27,8 +27,6 @@ input: | ""lon"": -121.8914 }","-121.8914",95141,CA,California,"America/Los_Angeles",false,Info,"af7cc946-0306-611b-2b01-000000000600","1,140","msmpeng.exe","c:\programdata\microsoft\windows defender\platform\4.18.2107.4-0\msmpeng.exe","5770385f-c22a-43e0-bf4c-06f5698ffbd9","25,987",T1036,Masquerading,"Microsoft-Windows-Sysmon","10.10.10.100",false,"RFC_1918",private,4,false,,"Network connection detected (rule: NetworkConnect)","1,088",wineventlog,"nt authority\system","nt authority",system,5,"1.10.0","Network connection detected (rule: NetworkConnect)",3,"2021-08-23T16:47:10.838Z",event,"Microsoft-Windows-Sysmon","NT AUTHORITY","S-1-5-18",SYSTEM,User -output-flags: -pretty 2 - output: | { "@timestamp": "Aug 17, 2021 @ 06:13:56.633", diff --git a/sio/csvio/ztests/reader-delim.yaml b/sio/csvio/ztests/reader-delim.yaml index 29f7f230a5..642498f9ff 100644 --- a/sio/csvio/ztests/reader-delim.yaml +++ b/sio/csvio/ztests/reader-delim.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: -i csv -csv.delim ; +flags: -i csv -csv.delim ; input: | a;b;c diff --git a/sio/csvio/ztests/reader.yaml b/sio/csvio/ztests/reader.yaml index b6743d41ad..0e044fc667 100644 --- a/sio/csvio/ztests/reader.yaml +++ b/sio/csvio/ztests/reader.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: -i csv +flags: -i csv input: | a,b,c diff --git a/sio/csvio/ztests/record-flat.yaml b/sio/csvio/ztests/record-flat.yaml index 7d83f9c497..fb9758b2b1 100644 --- a/sio/csvio/ztests/record-flat.yaml +++ b/sio/csvio/ztests/record-flat.yaml @@ -1,12 +1,12 @@ spq: pass +flags: -f csv + input: | {a:"hello",b:"world"} {a:"goodnight",b:"gracie"} {a:",",b:"gracie"} -output-flags: -f csv - output: | a,b hello,world diff --git a/sio/csvio/ztests/record-nested.yaml b/sio/csvio/ztests/record-nested.yaml index 051484750a..1f89d1a8fa 100644 --- a/sio/csvio/ztests/record-nested.yaml +++ b/sio/csvio/ztests/record-nested.yaml @@ -1,10 +1,10 @@ spq: pass +flags: -f csv + input: | {a:"hello",b:{c:"world",d:"goodbye"}} -output-flags: -f csv - output: | a,b.c,b.d hello,world,goodbye diff --git a/sio/csvio/ztests/string.yaml b/sio/csvio/ztests/string.yaml index e5ce5c8d89..e37b21a9d6 100644 --- a/sio/csvio/ztests/string.yaml +++ b/sio/csvio/ztests/string.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f csv + input: | {string:""} {string:"\""} @@ -7,8 +9,6 @@ input: | {string:"-"} {string:"\\"} -output-flags: -f csv - output: | string diff --git a/sio/csvio/ztests/time.yaml b/sio/csvio/ztests/time.yaml index 25bdb713c4..20043fe17e 100644 --- a/sio/csvio/ztests/time.yaml +++ b/sio/csvio/ztests/time.yaml @@ -1,12 +1,12 @@ spq: pass +flags: -f csv + input: | {time:1970-01-01T00:00:00Z} {time:1677-09-21T00:12:43.145224192Z} {time:2262-04-11T23:47:16.854775807Z} -output-flags: -f csv - output: | time 1970-01-01T00:00:00Z diff --git a/sio/csvio/ztests/type.yaml b/sio/csvio/ztests/type.yaml index 731dc4fc54..95efaaf17b 100644 --- a/sio/csvio/ztests/type.yaml +++ b/sio/csvio/ztests/type.yaml @@ -1,10 +1,10 @@ spq: pass +flags: -f csv + input: | {type:<{a:int64}>} -output-flags: -f csv - output: | type <{a:int64}> diff --git a/sio/csvio/ztests/uint.yaml b/sio/csvio/ztests/uint.yaml index c347d2a179..ec2bbe4c68 100644 --- a/sio/csvio/ztests/uint.yaml +++ b/sio/csvio/ztests/uint.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv + input: | {uint8:0::uint8,uint16:0::uint16,uint32:0::uint32,uint64:0::uint64} {uint8:255::uint8,uint16:65535::uint16,uint32:4294967295::uint32,uint64:18446744073709551615::uint64} -output-flags: -f csv - output: | uint8,uint16,uint32,uint64 0,0,0,0 diff --git a/sio/csvio/ztests/union.yaml b/sio/csvio/ztests/union.yaml index f6062359f0..98d8b2532e 100644 --- a/sio/csvio/ztests/union.yaml +++ b/sio/csvio/ztests/union.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f csv + input: | {a:1::(int64|string)} {a:"one"::(int64|string)} -output-flags: -f csv - output: | a 1 diff --git a/sio/jsonio/ztests/array-bug.yaml b/sio/jsonio/ztests/array-bug.yaml index a83329b4c0..0f828df3a0 100644 --- a/sio/jsonio/ztests/array-bug.yaml +++ b/sio/jsonio/ztests/array-bug.yaml @@ -1,7 +1,6 @@ spq: defuse(this) -input-flags: '-i json' -output-flags: '-f json -pretty=0' +flags: -i json -f json input: &input | {"b":true,"a":[{"x":1}]} @@ -13,8 +12,7 @@ output: *input spq: defuse(this) -input-flags: '-i json' -output-flags: '-f json -pretty=0' +flags: -i json -f json input: &input | {"a":[]} @@ -26,8 +24,7 @@ output: *input spq: defuse(this) -input-flags: '-i json' -output-flags: '-f json -pretty=0' +flags: -i json -f json input: &input | ["foo"] diff --git a/sio/jsonio/ztests/array.yaml b/sio/jsonio/ztests/array.yaml index 7659d2076c..39a6098ef8 100644 --- a/sio/jsonio/ztests/array.yaml +++ b/sio/jsonio/ztests/array.yaml @@ -1,8 +1,7 @@ # Test simple array spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"a":[1,2,3]} @@ -16,8 +15,7 @@ output: *input # Test array union spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"a":[1,2]} @@ -30,7 +28,7 @@ output: *input # Test empty array spq: pass -input-flags: '-i json' +flags: -i json input: &input | [] @@ -43,8 +41,7 @@ output: *input # Test array with fusion records spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | [{"a":1},{"a":2,"b":3}] @@ -56,8 +53,7 @@ output: *input # Test Union Arrays spq: pass -input-flags: -i json -output-flags: -f json +flags: -i json -f json input: &input | [] diff --git a/sio/jsonio/ztests/duplicate-field.yaml b/sio/jsonio/ztests/duplicate-field.yaml index 13346e427d..0e66f65f81 100644 --- a/sio/jsonio/ztests/duplicate-field.yaml +++ b/sio/jsonio/ztests/duplicate-field.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: '-i json' +flags: -i json input: | 1 diff --git a/sio/jsonio/ztests/empty-containers.yaml b/sio/jsonio/ztests/empty-containers.yaml index 0462af60b7..c044d5e4e5 100644 --- a/sio/jsonio/ztests/empty-containers.yaml +++ b/sio/jsonio/ztests/empty-containers.yaml @@ -1,9 +1,9 @@ spq: pass +flags: -f json + input: | {dns:["google.com"],uri:[]::[string],email:set[],ip:null} -output-flags: -f json - output: | {"dns":["google.com"],"uri":[],"email":[],"ip":null} diff --git a/sio/jsonio/ztests/error.yaml b/sio/jsonio/ztests/error.yaml index d04068e01d..bb668a4806 100644 --- a/sio/jsonio/ztests/error.yaml +++ b/sio/jsonio/ztests/error.yaml @@ -1,13 +1,11 @@ spq: x:=a/b -input-flags: -i json +flags: -i json -f json input: | {"a":1,"b":1} {"a":1,"b":0} -output-flags: -f json - output: | {"a":1,"b":1,"x":1} {"a":1,"b":0,"x":{"error":"divide by zero"}} diff --git a/sio/jsonio/ztests/first-token-is-empty-string.yaml b/sio/jsonio/ztests/first-token-is-empty-string.yaml index 90d2029d28..76052001f5 100644 --- a/sio/jsonio/ztests/first-token-is-empty-string.yaml +++ b/sio/jsonio/ztests/first-token-is-empty-string.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: -i json +flags: -i json input: | "" diff --git a/sio/jsonio/ztests/format.yaml b/sio/jsonio/ztests/format.yaml index 7ffbff88ef..0f6a695215 100644 --- a/sio/jsonio/ztests/format.yaml +++ b/sio/jsonio/ztests/format.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f json + input: | #separator \x09 #set_separator , @@ -11,8 +13,6 @@ input: | key1 value1 key2 value1 key1 value2 key2 value2 -output-flags: -f json - output: | {"_path":"conn","foo":"key1 value1","bar":"key2 value1"} {"_path":"conn","foo":"key1 value2","bar":"key2 value2"} diff --git a/sio/jsonio/ztests/html-escaping-disabled.yaml b/sio/jsonio/ztests/html-escaping-disabled.yaml index 358468ba84..8986639637 100644 --- a/sio/jsonio/ztests/html-escaping-disabled.yaml +++ b/sio/jsonio/ztests/html-escaping-disabled.yaml @@ -1,9 +1,9 @@ spq: pass +flags: -f json + input: &input | "<>&" {"<>&":"<>&"} -output-flags: -f json - output: *input diff --git a/sio/jsonio/ztests/hyphen.yaml b/sio/jsonio/ztests/hyphen.yaml index d614013ea9..cf51c9c522 100644 --- a/sio/jsonio/ztests/hyphen.yaml +++ b/sio/jsonio/ztests/hyphen.yaml @@ -1,10 +1,8 @@ spq: pass -input-flags: -i json +flags: -i json -f json input: &input | {"Hyphen":"-"} -output-flags: -f json - output: *input diff --git a/sio/jsonio/ztests/map-output.yaml b/sio/jsonio/ztests/map-output.yaml index 06c5243f93..a646d8e54b 100644 --- a/sio/jsonio/ztests/map-output.yaml +++ b/sio/jsonio/ztests/map-output.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f json + input: | map{} // Primitive keys @@ -35,8 +37,6 @@ input: | type t2=string map{"named"::t2:1} -output-flags: -f json - output: | {} {"8":1} diff --git a/sio/jsonio/ztests/nested-nulls.yaml b/sio/jsonio/ztests/nested-nulls.yaml index d46ac9b9fe..837ca09c92 100644 --- a/sio/jsonio/ztests/nested-nulls.yaml +++ b/sio/jsonio/ztests/nested-nulls.yaml @@ -1,9 +1,9 @@ spq: pass +flags: -f json + input: | {san:{dns:["google.com"],uri:null::([string]|null),email:null::(set[string]|null),ip:null::([ip]|null)}} -output-flags: -f json - output: | {"san":{"dns":["google.com"],"uri":null,"email":null,"ip":null}} diff --git a/sio/jsonio/ztests/none.yaml b/sio/jsonio/ztests/none.yaml index 8a4dcdd670..1f306e665e 100644 --- a/sio/jsonio/ztests/none.yaml +++ b/sio/jsonio/ztests/none.yaml @@ -1,13 +1,13 @@ spq: pass +flags: -f json + input: | {a:1,b?:2} {a:3,b?:none::int64} none none::int64 -output-flags: -f json - output: | {"a":1,"b":2} {"a":3} diff --git a/sio/jsonio/ztests/null-containers.yaml b/sio/jsonio/ztests/null-containers.yaml index 8b75fbb5ae..c830ba5fad 100644 --- a/sio/jsonio/ztests/null-containers.yaml +++ b/sio/jsonio/ztests/null-containers.yaml @@ -1,9 +1,9 @@ spq: pass +flags: -f json + input: | {dns:["google.com"],uri:null::([string]|null),email:null::(set[string]|null),ip:null::([ip]|null)} -output-flags: -f json - output: | {"dns":["google.com"],"uri":null,"email":null,"ip":null} diff --git a/sio/jsonio/ztests/parser-error.yaml b/sio/jsonio/ztests/parser-error.yaml index e0a7c294f3..f6618a4215 100644 --- a/sio/jsonio/ztests/parser-error.yaml +++ b/sio/jsonio/ztests/parser-error.yaml @@ -1,7 +1,7 @@ # Test parse error on EOF. spq: pass -input-flags: '-i json' +flags: -i json input: | 1 @@ -22,8 +22,7 @@ error: | # Test that we don't get a parser error on file with whitespace at the end. spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: "{\"x\":1}\n \n\n\n\t" diff --git a/sio/jsonio/ztests/pretty.yaml b/sio/jsonio/ztests/pretty.yaml index 74880cc0b4..f28ca950cf 100644 --- a/sio/jsonio/ztests/pretty.yaml +++ b/sio/jsonio/ztests/pretty.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f json -pretty 4 + input: | { f1: 1., @@ -13,8 +15,6 @@ input: | f9: [], } -output-flags: -f json -pretty 4 - output: | { "f1": 1, diff --git a/sio/jsonio/ztests/record.yaml b/sio/jsonio/ztests/record.yaml index 3527582ee2..25ab59faa3 100644 --- a/sio/jsonio/ztests/record.yaml +++ b/sio/jsonio/ztests/record.yaml @@ -1,7 +1,6 @@ spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"a":1,"b":2} @@ -15,8 +14,7 @@ output: *input # Test fusion on record leaves. spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"x":1} @@ -28,8 +26,7 @@ output: *input spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"a":1} @@ -46,8 +43,7 @@ output: *input # an explicit defuse here. spq: defuse(this) -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"a":1,"b":2} @@ -60,8 +56,7 @@ output: *input # Test nested record spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {"a":{"b":"foo"}} @@ -75,8 +70,7 @@ output: *input # Test empty record spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | {} diff --git a/sio/jsonio/ztests/time.yaml b/sio/jsonio/ztests/time.yaml index 1a8147bfaa..9715a4dc75 100644 --- a/sio/jsonio/ztests/time.yaml +++ b/sio/jsonio/ztests/time.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f json + input: | {_path:"conn",ts:2001-09-09T01:46:40Z,d:31y259d1h46m40s} {_path:"conn",ts:1970-01-01T00:00:01Z,d:-1s} @@ -7,8 +9,6 @@ input: | {_path:"conn",ts:1973-07-23T18:26:40Z,d:3y204d18h26m40s} {_path:"conn",ts:1970-01-01T00:00:00.00000001Z,d:10ns} -output-flags: -f json - output: | {"_path":"conn","ts":"2001-09-09T01:46:40Z","d":"31y259d1h46m40s"} {"_path":"conn","ts":"1970-01-01T00:00:01Z","d":"-1s"} diff --git a/sio/jsonio/ztests/typedef.yaml b/sio/jsonio/ztests/typedef.yaml index d1f1579ceb..28c7d9f014 100644 --- a/sio/jsonio/ztests/typedef.yaml +++ b/sio/jsonio/ztests/typedef.yaml @@ -1,12 +1,12 @@ spq: pass +flags: -f json + input: | type custom={a:int64} {a:1}::custom {b:2} -output-flags: -f json - output: | {"a":1} {"b":2} diff --git a/sio/jsonio/ztests/types.yaml b/sio/jsonio/ztests/types.yaml index c8a3d3b4a2..29e8419303 100644 --- a/sio/jsonio/ztests/types.yaml +++ b/sio/jsonio/ztests/types.yaml @@ -2,10 +2,10 @@ spq: pass +flags: -f json + input: | {a:10.1.1.1,a2:fe80::eef4:bbff:fe51:89ec,b:true,c:517::uint64,f:3.14159,i:18::int32,interval:1m,p:443::uint16,s:"Hello, world!",t:2020-01-07T14:36:23.487Z,type:} -output-flags: -f json - output: | {"a":"10.1.1.1","a2":"fe80::eef4:bbff:fe51:89ec","b":true,"c":517,"f":3.14159,"i":18,"interval":"1m","p":443,"s":"Hello, world!","t":"2020-01-07T14:36:23.487Z","type":""} diff --git a/sio/jsonio/ztests/unicode-nfc.yaml b/sio/jsonio/ztests/unicode-nfc.yaml index 9c2a5b2824..3ecff35c1c 100644 --- a/sio/jsonio/ztests/unicode-nfc.yaml +++ b/sio/jsonio/ztests/unicode-nfc.yaml @@ -1,6 +1,6 @@ spq: values this::bytes -input-flags: -i json +flags: -i json input: | "Å" diff --git a/sio/jsonio/ztests/union-output.yaml b/sio/jsonio/ztests/union-output.yaml index 241da9a704..05fbd188fd 100644 --- a/sio/jsonio/ztests/union-output.yaml +++ b/sio/jsonio/ztests/union-output.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f json + input: | 1::(int64|string) "one"::(int64|string) -output-flags: -f json - output: | 1 "one" diff --git a/sio/jsonio/ztests/union.yaml b/sio/jsonio/ztests/union.yaml index 8a6a7fe616..a6608df71a 100644 --- a/sio/jsonio/ztests/union.yaml +++ b/sio/jsonio/ztests/union.yaml @@ -1,7 +1,6 @@ spq: pass -input-flags: '-i json' -output-flags: '-f json' +flags: -i json -f json input: &input | 1 diff --git a/sio/lineio/ztests/reader.yaml b/sio/lineio/ztests/reader.yaml index 92d8a40813..1a45e94b8b 100644 --- a/sio/lineio/ztests/reader.yaml +++ b/sio/lineio/ztests/reader.yaml @@ -1,6 +1,6 @@ spq: pass -input-flags: -i line +flags: -i line input: | { diff --git a/sio/lineio/ztests/writer.yaml b/sio/lineio/ztests/writer.yaml index 024ffa933b..a9dd5903e8 100644 --- a/sio/lineio/ztests/writer.yaml +++ b/sio/lineio/ztests/writer.yaml @@ -1,6 +1,6 @@ spq: pass -output-flags: -f line +flags: -f line input: | "a" diff --git a/sio/supio/ztests/enum.yaml b/sio/supio/ztests/enum.yaml index b28974c147..c92040d1f6 100644 --- a/sio/supio/ztests/enum.yaml +++ b/sio/supio/ztests/enum.yaml @@ -1,6 +1,6 @@ spq: pass -output-flags: -f sup -pretty=4 +flags: -f sup -pretty 4 input: | {flip:"HEADS"::enum(HEADS,TAILS)} diff --git a/sio/supio/ztests/first-test.yaml b/sio/supio/ztests/first-test.yaml index 803728470b..4b737db56c 100644 --- a/sio/supio/ztests/first-test.yaml +++ b/sio/supio/ztests/first-test.yaml @@ -1,6 +1,6 @@ spq: pass -output-flags: -f sup -pretty=4 +flags: -f sup -pretty 4 input: | type port=uint16 diff --git a/sio/supio/ztests/tv.yaml b/sio/supio/ztests/tv.yaml index 02e3c1ad80..9a8dd4fd6b 100644 --- a/sio/supio/ztests/tv.yaml +++ b/sio/supio/ztests/tv.yaml @@ -1,6 +1,6 @@ spq: "put t:=typeof(s) | put tt:=typeof(t)" -output-flags: -f sup -pretty=4 +flags: -f sup -pretty 4 input: | type foo=uint8 diff --git a/sio/tableio/ztests/flatten.yaml b/sio/tableio/ztests/flatten.yaml index 7c3dbe02e6..f4622d2e78 100644 --- a/sio/tableio/ztests/flatten.yaml +++ b/sio/tableio/ztests/flatten.yaml @@ -2,11 +2,11 @@ skip: needs optional fields spq: pass +flags: -f table + input: | {_path:"conn",ts:2015-03-05T14:25:14.419939Z,uid:"CogZFI3py5JsFZGik",id:null::(null|{orig_h:ip,orig_p:port=uint16,resp_h:ip,resp_p:port})} -output-flags: -f table - output: | _path ts uid id.orig_h id.orig_p id.resp_h id.resp_p conn 2015-03-05T14:25:14.419939Z CogZFI3py5JsFZGik - - - - diff --git a/sio/tableio/ztests/nested-record-named.yaml b/sio/tableio/ztests/nested-record-named.yaml index 0f8d533ffd..96990b7720 100644 --- a/sio/tableio/ztests/nested-record-named.yaml +++ b/sio/tableio/ztests/nested-record-named.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f table + input: | type record_named={b:int64} {a:{b:1}::record_named} -output-flags: -f table - output: | a.b 1 diff --git a/sio/tableio/ztests/non-record-error.yaml b/sio/tableio/ztests/non-record-error.yaml index 40e05d5d50..85d0ea03c4 100644 --- a/sio/tableio/ztests/non-record-error.yaml +++ b/sio/tableio/ztests/non-record-error.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f table + input: | {a:1} [1,2] -output-flags: -f table - output: | a 1 diff --git a/sio/tableio/ztests/type-value.yaml b/sio/tableio/ztests/type-value.yaml index 89536d09ef..c42f49b505 100644 --- a/sio/tableio/ztests/type-value.yaml +++ b/sio/tableio/ztests/type-value.yaml @@ -1,10 +1,10 @@ spq: 'cut typeof(this)' +flags: -f table + input: | {a:1} -output-flags: -f table - output: | typeof <{a:int64}> diff --git a/sio/zeekio/ztests/duration.yaml b/sio/zeekio/ztests/duration.yaml index fea1f7bd3b..847090e407 100644 --- a/sio/zeekio/ztests/duration.yaml +++ b/sio/zeekio/ztests/duration.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f zeek + input: | {_path:"conn",ts:2001-09-09T01:46:40Z,d:31y259d1h46m40s} {_path:"conn",ts:1970-01-01T00:00:01Z,d:-1s} @@ -7,8 +9,6 @@ input: | {_path:"conn",ts:1973-07-23T18:26:40Z,d:3y204d18h26m40s} {_path:"conn",ts:1970-01-01T00:00:00.00000001Z,d:10ns} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/empty-close.yaml b/sio/zeekio/ztests/empty-close.yaml index 7c264f9ec5..1d6d879ff0 100644 --- a/sio/zeekio/ztests/empty-close.yaml +++ b/sio/zeekio/ztests/empty-close.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f zeek + input: | #separator \x09 #set_separator , @@ -10,6 +12,4 @@ input: | #types time string addr port addr port string string string string bool string string bool vector[string] vector[string] string string string string string #close 2019-10-10-08-30-35 -output-flags: -f zeek - output: "" diff --git a/sio/zeekio/ztests/flatten.yaml b/sio/zeekio/ztests/flatten.yaml index 816e4eae24..ff56cbd8f9 100644 --- a/sio/zeekio/ztests/flatten.yaml +++ b/sio/zeekio/ztests/flatten.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f zeek + input: | #separator \x09 #set_separator , @@ -10,8 +12,6 @@ input: | #types time string addr port addr port bool 1425565514.419939 CogZFI3py5JsFZGik 192.168.1.1 80 192.168.1.2 5353 F -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/multi-bsup.yaml b/sio/zeekio/ztests/multi-bsup.yaml index f1f5cf46cc..b9e4b53934 100644 --- a/sio/zeekio/ztests/multi-bsup.yaml +++ b/sio/zeekio/ztests/multi-bsup.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f zeek + input: | {_path:"a",ts:1970-01-01T00:00:10Z,d:1.} {_path:"b",ts:1970-01-01T00:00:11Z,d:1} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/nested-2.yaml b/sio/zeekio/ztests/nested-2.yaml index 16a4bdd772..8462c37447 100644 --- a/sio/zeekio/ztests/nested-2.yaml +++ b/sio/zeekio/ztests/nested-2.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f zeek + input: | type port=uint16 {_path:"smb_cmd",ts:2009-11-19T01:41:47.85978Z,uid:"Chjxid42dvvzIzdeG8",id:{orig_h:192.168.1.102,orig_p:1076::port,resp_h:192.168.1.1,resp_p:139::port},referenced_file:{ts:2009-11-19T01:41:47.85978Z,uid:"Chjxid42dvvzIzdeG8",id:{orig_h:192.168.1.102,orig_p:1076::port,resp_h:192.168.1.1,resp_p:139::port},fuid:"ZYjxid42dvvzIzdeG8"}} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/nested-record-named.yaml b/sio/zeekio/ztests/nested-record-named.yaml index 84bc1d1164..b16b8c8a77 100644 --- a/sio/zeekio/ztests/nested-record-named.yaml +++ b/sio/zeekio/ztests/nested-record-named.yaml @@ -1,11 +1,11 @@ spq: pass +flags: -f zeek + input: | type record_named={b:int64} {a:{b:1}::record_named} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/sup-types.yaml b/sio/zeekio/ztests/sup-types.yaml index 1d8d02df3a..e1b802b755 100644 --- a/sio/zeekio/ztests/sup-types.yaml +++ b/sio/zeekio/ztests/sup-types.yaml @@ -2,11 +2,11 @@ spq: pass +flags: -f zeek + input: | {b:0::uint8,i16:0::int16,u16:0::uint16,i32:0::int32,u32:0::uint32,i64:0,u64:0::uint64,a:10.1.2.3,n:10.0.0.0/8,d:16m40s} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/time.yaml b/sio/zeekio/ztests/time.yaml index 1a33bbd162..388fd666f1 100644 --- a/sio/zeekio/ztests/time.yaml +++ b/sio/zeekio/ztests/time.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f zeek + input: | {_path:"conn",ts:2015-03-05T14:25:14.419939Z,ts2:1970-01-01T00:00:01Z} {_path:"conn",ts:2015-03-05T14:25:14.4199391Z,ts2:1970-01-01T00:00:01Z} @@ -7,8 +9,6 @@ input: | {_path:"conn",ts:1924-10-29T09:34:45.580061Z,ts2:1970-01-01T00:00:01Z} {_path:"conn",ts:null::(time|null),ts2:null::(time|null)} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/types.yaml b/sio/zeekio/ztests/types.yaml index 7d92b7cc9e..bb0d6b40da 100644 --- a/sio/zeekio/ztests/types.yaml +++ b/sio/zeekio/ztests/types.yaml @@ -4,6 +4,8 @@ spq: pass +flags: -f zeek + input: &input | #separator \x09 #set_separator , @@ -14,6 +16,4 @@ input: &input | #types string enum set[enum] vector[int] vector[string] port count addr subnet interval time bool foo bar a,b,c 1,2,3 a,b,c 80 1000 10.5.100.20 10.0.0.0/8 1000.000000 1582404982.000000 T -output-flags: -f zeek - output: *input diff --git a/sio/zeekio/ztests/utf8.yaml b/sio/zeekio/ztests/utf8.yaml index 96c34a73ab..144fd0a7ba 100644 --- a/sio/zeekio/ztests/utf8.yaml +++ b/sio/zeekio/ztests/utf8.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f zeek + # Note the \x syntax is not valid in a SUP string so there is not a way # to get \x Zeek TSV escapes into th TSV output unless we add support # for bytes type to zeekio, in which case we can have support functions @@ -12,8 +14,6 @@ input: | {_path:"magic",foo:"😁"} {_path:"",foo:"foo😁bar\\x00\\x01baz"} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sio/zeekio/ztests/zeek-format-test.yaml b/sio/zeekio/ztests/zeek-format-test.yaml index 85eebc2728..a9eba77241 100644 --- a/sio/zeekio/ztests/zeek-format-test.yaml +++ b/sio/zeekio/ztests/zeek-format-test.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -f zeek + input: | {s:null::(string|null)} {s:"foo"} @@ -26,8 +28,6 @@ input: | {s:["abc","xyz"]} {s:["a,b"]} -output-flags: -f zeek - output: | #separator \x09 #set_separator , diff --git a/sup/ztests/fusion.yaml b/sup/ztests/fusion.yaml index c5c5ed4a27..ef23649a76 100644 --- a/sup/ztests/fusion.yaml +++ b/sup/ztests/fusion.yaml @@ -1,6 +1,6 @@ spq: pass -output-flags: -fusion +flags: -fusion input: &input | {a:fusion(none::(int64|null|none),)} diff --git a/sup/ztests/named-primitive.yaml b/sup/ztests/named-primitive.yaml index d44bea5ead..21741f5cb0 100644 --- a/sup/ztests/named-primitive.yaml +++ b/sup/ztests/named-primitive.yaml @@ -1,5 +1,7 @@ spq: pass +flags: -pretty 2 + input: &input | type myuint8 = uint8 0::myuint8 @@ -68,5 +70,3 @@ input: &input | } output: *input - -output-flags: -pretty=2 diff --git a/sup/ztests/optional-none.yaml b/sup/ztests/optional-none.yaml index e0cda7449d..8742937490 100644 --- a/sup/ztests/optional-none.yaml +++ b/sup/ztests/optional-none.yaml @@ -1,8 +1,8 @@ spq: pass -input: '{x?:none}' +flags: -i sup -input-flags: -i sup +input: '{x?:none}' error: | stdio:stdin: non-union none assigned to optional field x diff --git a/sup/ztests/pretty-type-value.yaml b/sup/ztests/pretty-type-value.yaml index 28ac6031a1..db1decbe41 100644 --- a/sup/ztests/pretty-type-value.yaml +++ b/sup/ztests/pretty-type-value.yaml @@ -1,5 +1,7 @@ spq: values this, "===" +flags: -pretty 4 + input: | <{foo:int64}|{bar:string}|uint64> type named=set[{foo:int64}|uint64] @@ -10,8 +12,6 @@ input: | <[[string]]> -output-flags: -pretty=4 - output: |