github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/lang/expressions/parse_vars_test.go (about) 1 package expressions 2 3 import ( 4 "testing" 5 6 "github.com/lmorg/murex/lang/expressions/symbols" 7 ) 8 9 func TestParseVarsScalarSymbol(t *testing.T) { 10 tests := expTestsT{ 11 symbol: symbols.Scalar, 12 tests: []expTestT{ 13 { 14 input: `$foo[1]`, 15 expected: `$foo[1]`, 16 pos: -1, 17 }, 18 { 19 input: `$foo[[/1]]`, 20 expected: `$foo[[/1]]`, 21 pos: -1, 22 }, 23 }, 24 } 25 26 testParserSymbol(t, tests) 27 } 28 29 /*func TestParseVarsArraySymbol(t *testing.T) { 30 tests := expTestsT{ 31 symbol: symbols.Calculated, 32 tests: []expTestT{ 33 { 34 input: `@foo[1]`, 35 expected: `@foo[1]`, 36 pos: 6, 37 }, 38 { 39 input: `@foo[[/1]]`, 40 expected: `@foo[[/1]]`, 41 pos: 6, 42 }, 43 }, 44 } 45 46 testParserSymbol(t, tests) 47 } 48 */