Skip to content

Commit 7d74d1b

Browse files
committed
Add test with multiple changesets
1 parent 28f539c commit 7d74d1b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/main.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ Testing replace mode:
3030
this is the third ___xxx line
3131
this is the last line
3232

33+
Testing replace mode with multiple changesets:
34+
35+
$ cat > test.txt <<EOF
36+
> this is a testline
37+
> this is the second barfoo line
38+
> this is the third foobar line
39+
> this is the last oofrab line
40+
> EOF
41+
$ goreplace -s foobar -r 111 -s barfoo -r 222 -s oofrab -r 333 test.txt
42+
$ cat test.txt
43+
this is a testline
44+
this is the second 222 line
45+
this is the third 111 line
46+
this is the last 333 line
47+
3348
Testing replace mode with stdin:
3449

3550
$ cat > test.txt <<EOF

0 commit comments

Comments
 (0)