<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/main_test.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2024-04-21 17:30:05 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2024-04-21 17:30:05 +0100
commitf6e27ecd8881498776428c0ae5b674f65192058e (patch)
treec8a9988adb29d555f9f4cff232cbc3f2e4bcb7ca /main/main_test.go
parent1e66aaece6ea7cd3c705ca56ce5558e8f87681b8 (diff)
downloadstred-go-f6e27ecd8881498776428c0ae5b674f65192058e.tar
Modify merge to no longer read a new value
Now just merges the last two values in the space
Diffstat (limited to 'main/main_test.go')
-rw-r--r--main/main_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/main_test.go b/main/main_test.go
index be439a3..1510497 100644
--- a/main/main_test.go
+++ b/main/main_test.go
@@ -75,7 +75,7 @@ func TestMain(t *testing.T) {
},
{
name: "Change full names in place",
- program: "s/#(\"people\" @(. #(\"first_name\" .)#)@)#/{ ms/#(\"people\" @(. (#(\"first_name\" \".{-0}$a\" \"last_name\" \".{-0}$b\")#$_) `#(\"name\" \"$a $b\")#`)@)#/ }",
+ program: "s/#(\"people\" @(. #(\"first_name\" .)#)@)#/{ Nms/#(\"people\" @(. (#(\"first_name\" \".{-0}$a\" \"last_name\" \".{-0}$b\")#$_) `#(\"name\" \"$a $b\")#`)@)#/ }",
input: miscInput,
expected: `{"something":{"nested":"Here is my test value"},"array":["Hello","world","these","are","values"],"people":[{"name":"Charlie Johnson","age":22},{"name":"Tom Johnson","age":18},{"name":"Charlie Chaplin","age":122},{"name":"John Johnson","age":48}]}`,
},