<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/main_test.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2024-04-07 15:27:36 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2024-04-07 15:27:36 +0100
commit658900fcae610caace83a112ac0ee865108ebc92 (patch)
tree4d7b6bebe0d192abf62970ca4324ef1ff274e3c8 /subex/main_test.go
parent81925b6ad5212512d27365b8224b76095191431f (diff)
downloadstred-go-658900fcae610caace83a112ac0ee865108ebc92.tar
Change output subex internals to allow structures
Also add substitute register syntactic sugar
Diffstat (limited to 'subex/main_test.go')
-rw-r--r--subex/main_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/subex/main_test.go b/subex/main_test.go
index 8e98798..fb6f152 100644
--- a/subex/main_test.go
+++ b/subex/main_test.go
@@ -405,6 +405,18 @@ func TestSubexMain(t *testing.T) {
},
},
},
+ {
+ subex: ".{-0}`\"hello\"`",
+ input: []walk.Value {
+ walk.NumberValue(1),
+ walk.NumberValue(2),
+ },
+ expected: []walk.Value {
+ walk.NumberValue(1),
+ walk.NumberValue(2),
+ walk.StringValue("hello"),
+ },
+ },
}
for i, test := range tests {