| 1 | package internalscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/ |
| 2 | |
| 3 | import ( |
| 4 | "testingscip-go gomod github.com/golang/go/src go1.25 testing/" |
| 5 | ) |
| 6 | |
| 7 | func collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#, input string) []Tokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token# { |
| 8 | t.Helperscip-go gomod github.com/golang/go/src go1.25 testing/common#Helper().() |
| 9 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(input) |
| 10 | var tokens []Tokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token# |
| 11 | for { |
| 12 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 13 | if err != nil { |
| 14 | t.Fatalfscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatalf().("unexpected error: %v", err) |
| 15 | } |
| 16 | tokens = append(tokens, token) |
| 17 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. == TokenEOFscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenEOF. { |
| 18 | break |
| 19 | } |
| 20 | } |
| 21 | return tokens |
| 22 | } |
| 23 | |
| 24 | func TestTokenizer_BareIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_BareIdentifier().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 25 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "node") |
| 26 | if len(tokens) != 2 { |
| 27 | t.Fatalfscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatalf().("expected 2 tokens, got %d", len(tokens)) |
| 28 | } |
| 29 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "node" { |
| 30 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected identifier 'node', got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func TestTokenizer_QuotedStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_QuotedString().(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 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, `"hello world"`) |
| 36 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenQuotedStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenQuotedString. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "hello world" { |
| 37 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected quoted string 'hello world', got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func TestTokenizer_StringEscapesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_StringEscapes().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 42 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, `"hello\nworld\t!"`) |
| 43 | if tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "hello\nworld\t!" { |
| 44 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected escaped string, got %q", tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestTokenizer_UnicodeEscapescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_UnicodeEscape().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 49 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, `"\u{1F600}"`) |
| 50 | if tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "\U0001F600" { |
| 51 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected unicode char, got %q", tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func TestTokenizer_Integerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_Integer().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 56 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "42") |
| 57 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIntegerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenInteger. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "42" { |
| 58 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected integer 42, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func TestTokenizer_NegativeIntegerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_NegativeInteger().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 63 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "-7") |
| 64 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIntegerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenInteger. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "-7" { |
| 65 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected integer -7, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | func TestTokenizer_Floatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_Float().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 70 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "3.14") |
| 71 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenFloat. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "3.14" { |
| 72 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected float 3.14, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func TestTokenizer_FloatExponentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_FloatExponent().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 77 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "1.5e10") |
| 78 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenFloat. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "1.5e10" { |
| 79 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected float 1.5e10, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | func TestTokenizer_HexIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_HexInt().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 84 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "0xff") |
| 85 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenHexIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenHexInt. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "0xff" { |
| 86 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected hex int, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func TestTokenizer_OctalIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_OctalInt().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 91 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "0o77") |
| 92 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenOctalIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenOctalInt. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "0o77" { |
| 93 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected octal int, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | func TestTokenizer_BinaryIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_BinaryInt().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 98 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "0b1010") |
| 99 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenBinaryIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenBinaryInt. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "0b1010" { |
| 100 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected binary int, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | func TestTokenizer_UnderscoreInNumbersscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_UnderscoreInNumbers().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 105 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "1_000_000") |
| 106 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIntegerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenInteger. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "1000000" { |
| 107 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected integer 1000000, got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func TestTokenizer_V1Truescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V1True().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 112 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("true") |
| 113 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 114 | if err != nil { |
| 115 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 116 | } |
| 117 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenTruescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenTrue. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "true" { |
| 118 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected v1 true, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 119 | } |
| 120 | if tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version. != Version1scip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Version1. { |
| 121 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected version 1, got %v", tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version.) |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | func TestTokenizer_V1Falsescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V1False().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 126 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("false") |
| 127 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 128 | if err != nil { |
| 129 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 130 | } |
| 131 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenFalsescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenFalse. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "false" { |
| 132 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected v1 false, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func TestTokenizer_V1Nullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V1Null().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 137 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("null") |
| 138 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 139 | if err != nil { |
| 140 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 141 | } |
| 142 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenNullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenNull. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "null" { |
| 143 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected v1 null, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | func TestTokenizer_V2Truescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2True().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 148 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("#true") |
| 149 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 150 | if err != nil { |
| 151 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 152 | } |
| 153 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenTruescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenTrue. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "#true" { |
| 154 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected v2 true, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 155 | } |
| 156 | if tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version. != Version2scip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Version2. { |
| 157 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected version 2, got %v", tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version.) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | func TestTokenizer_V2Falsescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2False().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 162 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("#false") |
| 163 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 164 | if err != nil { |
| 165 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 166 | } |
| 167 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenFalsescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenFalse. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "#false" { |
| 168 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected v2 false, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | func TestTokenizer_V2Nullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2Null().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 173 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("#null") |
| 174 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 175 | if err != nil { |
| 176 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 177 | } |
| 178 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenNullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenNull. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "#null" { |
| 179 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected v2 null, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | func TestTokenizer_V2Infscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2Inf().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 184 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("#inf") |
| 185 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 186 | if err != nil { |
| 187 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 188 | } |
| 189 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenInfscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenInf. { |
| 190 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected inf, got %v", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | func TestTokenizer_V2NegInfscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2NegInf().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 195 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("#-inf") |
| 196 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 197 | if err != nil { |
| 198 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 199 | } |
| 200 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenNegInfscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenNegInf. { |
| 201 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected -inf, got %v", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | func TestTokenizer_V2NaNscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2NaN().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 206 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().("#nan") |
| 207 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 208 | if err != nil { |
| 209 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 210 | } |
| 211 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenNaNscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenNaN. { |
| 212 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected nan, got %v", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | func TestTokenizer_V1RawStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V1RawString().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 217 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(`r"hello world"`) |
| 218 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 219 | if err != nil { |
| 220 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 221 | } |
| 222 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenRawStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenRawString. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "hello world" { |
| 223 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected raw string 'hello world', got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 224 | } |
| 225 | if tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version. != Version1scip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Version1. { |
| 226 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected version 1, got %v", tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version.) |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | func TestTokenizer_V1RawStringWithHashesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V1RawStringWithHashes().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 231 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(`r#"hello "world""#`) |
| 232 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 233 | if err != nil { |
| 234 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 235 | } |
| 236 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenRawStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenRawString. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != `hello "world"` { |
| 237 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected raw string, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | func TestTokenizer_V2RawStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2RawString().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 242 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(`#"hello world"#`) |
| 243 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 244 | if err != nil { |
| 245 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 246 | } |
| 247 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenRawStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenRawString. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "hello world" { |
| 248 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected raw string 'hello world', got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 249 | } |
| 250 | if tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version. != Version2scip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Version2. { |
| 251 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected version 2, got %v", tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version.) |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | func TestTokenizer_V2RawStringDoubleHashscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_V2RawStringDoubleHash().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 256 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(`##"contains #"quotes"# inside"##`) |
| 257 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 258 | if err != nil { |
| 259 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 260 | } |
| 261 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenRawStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenRawString. || token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != `contains #"quotes"# inside` { |
| 262 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected raw string, got %v %q", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | func TestTokenizer_MultiLineStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_MultiLineString().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 267 | input := "\"\"\"\n hello\n world\n \"\"\"" |
| 268 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(input) |
| 269 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 270 | if err != nil { |
| 271 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 272 | } |
| 273 | if token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenMultiLineStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenMultiLineString. { |
| 274 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected multi-line string, got %v", token.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 275 | } |
| 276 | if token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "hello\nworld" { |
| 277 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected dedented content, got %q", token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | func TestTokenizer_Bracesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_Braces().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 282 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "{ }") |
| 283 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenOpenBracescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenOpenBrace. { |
| 284 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected open brace, got %v", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 285 | } |
| 286 | if tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenCloseBracescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenCloseBrace. { |
| 287 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected close brace, got %v", tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | func TestTokenizer_Equalsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_Equals().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 292 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "key=val") |
| 293 | if tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenEqualsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenEquals. { |
| 294 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected equals, got %v", tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | func TestTokenizer_SlashDashscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_SlashDash().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 299 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "/-") |
| 300 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenSlashDashscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenSlashDash. { |
| 301 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected slash-dash, got %v", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type.) |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | func TestTokenizer_LineCommentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_LineComment().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 306 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "node // comment\nother") |
| 307 | types := tokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/tokenTypes().(tokens) |
| 308 | expected := []TokenTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenType#{TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier., TokenNewlinescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenNewline., TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier., TokenEOFscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenEOF.} |
| 309 | assertTokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/assertTokenTypes().(t, types, expected) |
| 310 | } |
| 311 | |
| 312 | func TestTokenizer_BlockCommentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_BlockComment().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 313 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "node /* comment */ other") |
| 314 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "node" { |
| 315 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected 'node', got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 316 | } |
| 317 | if tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier. || tokens[1].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "other" { |
| 318 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected 'other', got %v %q", tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[1].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | func TestTokenizer_NestedBlockCommentscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_NestedBlockComment().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 323 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "node /* outer /* inner */ outer */ other") |
| 324 | if tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "node" { |
| 325 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected 'node', got %q", tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 326 | } |
| 327 | if tokens[1].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "other" { |
| 328 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected 'other', got %q", tokens[1].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | func TestTokenizer_LineContinuationscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_LineContinuation().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 333 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "node \\\n arg") |
| 334 | if tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier. || tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "node" { |
| 335 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected 'node', got %v %q", tokens[0].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[0].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 336 | } |
| 337 | if tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. != TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier. || tokens[1].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != "arg" { |
| 338 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected 'arg', got %v %q", tokens[1].Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type., tokens[1].Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | func TestTokenizer_Semicolonscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_Semicolon().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 343 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "a; b") |
| 344 | types := tokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/tokenTypes().(tokens) |
| 345 | expected := []TokenTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenType#{TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier., TokenSemicolonscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenSemicolon., TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier., TokenEOFscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenEOF.} |
| 346 | assertTokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/assertTokenTypes().(t, types, expected) |
| 347 | } |
| 348 | |
| 349 | func TestTokenizer_TypeAnnotationscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_TypeAnnotation().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 350 | tokens := collectTokensscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/collectTokens().(t, "(u8)123") |
| 351 | types := tokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/tokenTypes().(tokens) |
| 352 | expected := []TokenTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenType#{TokenOpenParenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenOpenParen., TokenIdentifierscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenIdentifier., TokenCloseParenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenCloseParen., TokenIntegerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenInteger., TokenEOFscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenEOF.} |
| 353 | assertTokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/assertTokenTypes().(t, types, expected) |
| 354 | } |
| 355 | |
| 356 | func TestTokenizer_EscapeSscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TestTokenizer_EscapeS().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 357 | tok := NewTokenizerscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/NewTokenizer().(`"\s"`) |
| 358 | token, err := tok.NextTokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#NextToken().() |
| 359 | if err != nil { |
| 360 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 361 | } |
| 362 | if token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value. != " " { |
| 363 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().(`expected space from \s, got %q`, token.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Value.) |
| 364 | } |
| 365 | if tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version. != Version2scip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Version2. { |
| 366 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected version 2, got %v", tok.Versionscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Tokenizer#Version.) |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | func tokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/tokenTypes().(tokens []Tokenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#) []TokenTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenType# { |
| 371 | types := make([]TokenTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenType#, len(tokens)) |
| 372 | for i, t := range tokens { |
| 373 | types[i] = t.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/Token#Type. |
| 374 | } |
| 375 | return types |
| 376 | } |
| 377 | |
| 378 | func assertTokenTypesscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/assertTokenTypes().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#, got, expected []TokenTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/parsing/kdl/internal`/TokenType#) { |
| 379 | t.Helperscip-go gomod github.com/golang/go/src go1.25 testing/common#Helper().() |
| 380 | if len(got) != len(expected) { |
| 381 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected %d tokens, got %d", len(expected), len(got)) |
| 382 | return |
| 383 | } |
| 384 | for i := range expected { |
| 385 | if got[i] != expected[i] { |
| 386 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("token %d: expected %v, got %v", i, expected[i], got[i]) |
| 387 | } |
| 388 | } |
| 389 | } |