| 1 | package execution_testscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/ |
| 2 | |
| 3 | import ( |
| 4 | "testingscip-go gomod github.com/golang/go/src go1.25 testing/" |
| 5 | |
| 6 | "github.com/tomwright/dasel/v3/executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/" |
| 7 | ) |
| 8 | |
| 9 | func TestOptionsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/TestOptions().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 10 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("WithFuncs", func(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 11 | fc := executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.DefaultFuncCollectionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/DefaultFuncCollection..Copyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Copy().() |
| 12 | opts := executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.NewOptionsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/NewOptions().(executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.WithFuncsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/WithFuncs().(fc)) |
| 13 | if _, ok := opts.Funcsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/Options#Funcs..Getscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Get().("len"); !ok { |
| 14 | t.Errorscip-go gomod github.com/golang/go/src go1.25 testing/common#Error().("expected funcs to contain 'len'") |
| 15 | } |
| 16 | }) |
| 17 | |
| 18 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("WithoutUnstable", func(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 19 | opts := executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.NewOptionsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/NewOptions().(executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.WithUnstablescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/WithUnstable().(), executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.WithoutUnstablescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/WithoutUnstable().()) |
| 20 | if opts.Unstablescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/Options#Unstable. { |
| 21 | t.Errorscip-go gomod github.com/golang/go/src go1.25 testing/common#Error().("expected unstable to be false") |
| 22 | } |
| 23 | }) |
| 24 | } |
| 25 | |
| 26 | func TestFuncCollectionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/TestFuncCollection().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 27 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("Copy", func(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 28 | fc := executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.DefaultFuncCollectionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/DefaultFuncCollection..Copyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Copy().() |
| 29 | if _, ok := fc.Getscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Get().("len"); !ok { |
| 30 | t.Errorscip-go gomod github.com/golang/go/src go1.25 testing/common#Error().("expected copy to contain 'len'") |
| 31 | } |
| 32 | }) |
| 33 | |
| 34 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("Delete", func(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 35 | fc := executionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/.DefaultFuncCollectionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/DefaultFuncCollection..Copyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Copy().() |
| 36 | fc.Deletescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Delete().("len") |
| 37 | if _, ok := fc.Getscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution`/FuncCollection#Get().("len"); ok { |
| 38 | t.Errorscip-go gomod github.com/golang/go/src go1.25 testing/common#Error().("expected len to be deleted") |
| 39 | } |
| 40 | }) |
| 41 | } |