<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2024-04-27 09:29:46 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2024-04-27 09:29:46 +0100
commit8ac12c99fc59b01da40c2939cb4a7b72d32d2153 (patch)
treea60859e7614f35a8158fdd7614b2e3c196460b61 /main
parent7084f5e1ceb61eab199512410048ad53e3ea08d7 (diff)
downloadstred-go-8ac12c99fc59b01da40c2939cb4a7b72d32d2153.tar
Add iterating destructures
Diffstat (limited to 'main')
-rw-r--r--main/main_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/main_test.go b/main/main_test.go
index b745202..8512b62 100644
--- a/main/main_test.go
+++ b/main/main_test.go
@@ -87,6 +87,13 @@ func TestMain(t *testing.T) {
expected: `["Charlie Johnson","Tom Johnson","Charlie Chaplin","John Johnson"]`,
},
{
+ name: "Get full names with merge full command",
+ program: "s/#(\"people\"$_ :(): )-/p M/#( \"people\" @( . #()# )@ )#/{ s/#( \"people\"$_ @( . #[ \"first_name\" \".{-0}$a\" | \"last_name\" \".{-0}$b\" | .. $_]- `\"$a $b\"` )@ )-/p }",
+ quiet: true,
+ input: miscInput,
+ expected: `["Charlie Johnson","Tom Johnson","Charlie Chaplin","John Johnson"]`,
+ },
+ {
name: "Verbose concat array values",
program: "as/#( \"array\"$_ :(): )-/{ :s N/#( .$_ . )-/{ es/.{-0}:():/be mbs } :em s/:( -( ~(.{-0}` `)-{-0} ~(.{-0})- )~ )-/p }",
quiet: true,