Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chores[deps]: tester-utils 0.2.20 upgrade #17

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/codecrafters-io/grep-tester

go 1.20

require github.com/codecrafters-io/tester-utils v0.2.18
require github.com/codecrafters-io/tester-utils v0.2.20

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -12,7 +12,7 @@ require (
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/codecrafters-io/tester-utils v0.2.17 h1:rO04TuOME773cZE729kIVOiXpZSq5
github.com/codecrafters-io/tester-utils v0.2.17/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/codecrafters-io/tester-utils v0.2.18 h1:fjIWERlzR1700Mogr8+30H3bYyLY+36KMU8ojloo3/0=
github.com/codecrafters-io/tester-utils v0.2.18/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/codecrafters-io/tester-utils v0.2.20 h1:t/IFFXOrSgRIoq6x4kUnRdjuai7EcwWH42Za25hvneA=
github.com/codecrafters-io/tester-utils v0.2.20/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
Expand Down Expand Up @@ -37,6 +39,8 @@ golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
184 changes: 92 additions & 92 deletions internal/test_helpers/fixtures/alternation/success
Original file line number Diff line number Diff line change
@@ -1,42 +1,64 @@
[stage-1] Running tests for Stage #1: init
[stage-1] $ echo "dog" | ./your_grep.sh -E "d"
[your_program] dog
[stage-1] ✓ Received exit code 0.
[stage-1] $ echo "dog" | ./your_grep.sh -E "f"
[stage-1] ✓ Received exit code 1.
[stage-1] Test passed.
[stage-12] Running tests for Stage #12: alternation
[stage-12] $ echo "a cat" | ./your_grep.sh -E "a (cat|dog)"
[your_program] a cat
[stage-12] ✓ Received exit code 0.
[stage-12] $ echo "a dog" | ./your_grep.sh -E "a (cat|dog)"
[your_program] a dog
[stage-12] ✓ Received exit code 0.
[stage-12] $ echo "a cow" | ./your_grep.sh -E "a (cat|dog)"
[stage-12] ✓ Received exit code 1.
[stage-12] Test passed.

[stage-2] Running tests for Stage #2: match_digit
[stage-2] $ echo "123" | ./your_grep.sh -E "\d"
[your_program] 123
[stage-2] ✓ Received exit code 0.
[stage-2] $ echo "apple" | ./your_grep.sh -E "\d"
[stage-2] ✓ Received exit code 1.
[stage-2] Test passed.
[stage-11] Running tests for Stage #11: wildcard
[stage-11] $ echo "cat" | ./your_grep.sh -E "c.t"
[your_program] cat
[stage-11] ✓ Received exit code 0.
[stage-11] $ echo "cot" | ./your_grep.sh -E "c.t"
[your_program] cot
[stage-11] ✓ Received exit code 0.
[stage-11] $ echo "car" | ./your_grep.sh -E "c.t"
[stage-11] ✓ Received exit code 1.
[stage-11] Test passed.

[stage-3] Running tests for Stage #3: match_alphanumeric
[stage-3] $ echo "word" | ./your_grep.sh -E "\w"
[your_program] word
[stage-3] ✓ Received exit code 0.
[stage-3] $ echo "$!?" | ./your_grep.sh -E "\w"
[stage-3] ✓ Received exit code 1.
[stage-3] Test passed.
[stage-10] Running tests for Stage #10: zero_or_one_quantifier
[stage-10] $ echo "cat" | ./your_grep.sh -E "ca?t"
[your_program] cat
[stage-10] ✓ Received exit code 0.
[stage-10] $ echo "act" | ./your_grep.sh -E "ca?t"
[your_program] act
[stage-10] ✓ Received exit code 0.
[stage-10] $ echo "dog" | ./your_grep.sh -E "ca?t"
[stage-10] ✓ Received exit code 1.
[stage-10] $ echo "cag" | ./your_grep.sh -E "ca?t"
[stage-10] ✓ Received exit code 1.
[stage-10] Test passed.

[stage-4] Running tests for Stage #4: positive_character_groups
[stage-4] $ echo "a" | ./your_grep.sh -E "[abcd]"
[your_program] a
[stage-4] ✓ Received exit code 0.
[stage-4] $ echo "efgh" | ./your_grep.sh -E "[abcd]"
[stage-4] ✓ Received exit code 1.
[stage-4] Test passed.
[stage-9] Running tests for Stage #9: one_or_more_quantifier
[stage-9] $ echo "caaats" | ./your_grep.sh -E "ca+t"
[your_program] caaats
[stage-9] ✓ Received exit code 0.
[stage-9] $ echo "cat" | ./your_grep.sh -E "ca+t"
[your_program] cat
[stage-9] ✓ Received exit code 0.
[stage-9] $ echo "act" | ./your_grep.sh -E "ca+t"
[stage-9] ✓ Received exit code 1.
[stage-9] Test passed.

[stage-5] Running tests for Stage #5: negative_character_groups
[stage-5] $ echo "apple" | ./your_grep.sh -E "[^xyz]"
[your_program] apple
[stage-5] ✓ Received exit code 0.
[stage-5] $ echo "banana" | ./your_grep.sh -E "[^anb]"
[stage-5] ✓ Received exit code 1.
[stage-5] Test passed.
[stage-8] Running tests for Stage #8: end_of_string_anchor
[stage-8] $ echo "cat" | ./your_grep.sh -E "cat$"
[your_program] cat
[stage-8] ✓ Received exit code 0.
[stage-8] $ echo "cats" | ./your_grep.sh -E "cat$"
[stage-8] ✓ Received exit code 1.
[stage-8] Test passed.

[stage-7] Running tests for Stage #7: start_of_string_anchor
[stage-7] $ echo "log" | ./your_grep.sh -E "^log"
[your_program] log
[stage-7] ✓ Received exit code 0.
[stage-7] $ echo "slog" | ./your_grep.sh -E "^log"
[stage-7] ✓ Received exit code 1.
[stage-7] Test passed.

[stage-6] Running tests for Stage #6: combining_character_classes
[stage-6] $ echo "sally has 3 apples" | ./your_grep.sh -E "\d apple"
Expand All @@ -59,64 +81,42 @@
[stage-6] ✓ Received exit code 1.
[stage-6] Test passed.

[stage-7] Running tests for Stage #7: start_of_string_anchor
[stage-7] $ echo "log" | ./your_grep.sh -E "^log"
[your_program] log
[stage-7] ✓ Received exit code 0.
[stage-7] $ echo "slog" | ./your_grep.sh -E "^log"
[stage-7] ✓ Received exit code 1.
[stage-7] Test passed.

[stage-8] Running tests for Stage #8: end_of_string_anchor
[stage-8] $ echo "cat" | ./your_grep.sh -E "cat$"
[your_program] cat
[stage-8] ✓ Received exit code 0.
[stage-8] $ echo "cats" | ./your_grep.sh -E "cat$"
[stage-8] ✓ Received exit code 1.
[stage-8] Test passed.
[stage-5] Running tests for Stage #5: negative_character_groups
[stage-5] $ echo "apple" | ./your_grep.sh -E "[^xyz]"
[your_program] apple
[stage-5] ✓ Received exit code 0.
[stage-5] $ echo "banana" | ./your_grep.sh -E "[^anb]"
[stage-5] ✓ Received exit code 1.
[stage-5] Test passed.

[stage-9] Running tests for Stage #9: one_or_more_quantifier
[stage-9] $ echo "caaats" | ./your_grep.sh -E "ca+t"
[your_program] caaats
[stage-9] ✓ Received exit code 0.
[stage-9] $ echo "cat" | ./your_grep.sh -E "ca+t"
[your_program] cat
[stage-9] ✓ Received exit code 0.
[stage-9] $ echo "act" | ./your_grep.sh -E "ca+t"
[stage-9] ✓ Received exit code 1.
[stage-9] Test passed.
[stage-4] Running tests for Stage #4: positive_character_groups
[stage-4] $ echo "a" | ./your_grep.sh -E "[abcd]"
[your_program] a
[stage-4] ✓ Received exit code 0.
[stage-4] $ echo "efgh" | ./your_grep.sh -E "[abcd]"
[stage-4] ✓ Received exit code 1.
[stage-4] Test passed.

[stage-10] Running tests for Stage #10: zero_or_one_quantifier
[stage-10] $ echo "cat" | ./your_grep.sh -E "ca?t"
[your_program] cat
[stage-10] ✓ Received exit code 0.
[stage-10] $ echo "act" | ./your_grep.sh -E "ca?t"
[your_program] act
[stage-10] ✓ Received exit code 0.
[stage-10] $ echo "dog" | ./your_grep.sh -E "ca?t"
[stage-10] ✓ Received exit code 1.
[stage-10] $ echo "cag" | ./your_grep.sh -E "ca?t"
[stage-10] ✓ Received exit code 1.
[stage-10] Test passed.
[stage-3] Running tests for Stage #3: match_alphanumeric
[stage-3] $ echo "word" | ./your_grep.sh -E "\w"
[your_program] word
[stage-3] ✓ Received exit code 0.
[stage-3] $ echo "$!?" | ./your_grep.sh -E "\w"
[stage-3] ✓ Received exit code 1.
[stage-3] Test passed.

[stage-11] Running tests for Stage #11: wildcard
[stage-11] $ echo "cat" | ./your_grep.sh -E "c.t"
[your_program] cat
[stage-11] ✓ Received exit code 0.
[stage-11] $ echo "cot" | ./your_grep.sh -E "c.t"
[your_program] cot
[stage-11] ✓ Received exit code 0.
[stage-11] $ echo "car" | ./your_grep.sh -E "c.t"
[stage-11] ✓ Received exit code 1.
[stage-11] Test passed.
[stage-2] Running tests for Stage #2: match_digit
[stage-2] $ echo "123" | ./your_grep.sh -E "\d"
[your_program] 123
[stage-2] ✓ Received exit code 0.
[stage-2] $ echo "apple" | ./your_grep.sh -E "\d"
[stage-2] ✓ Received exit code 1.
[stage-2] Test passed.

[stage-12] Running tests for Stage #12: alternation
[stage-12] $ echo "a cat" | ./your_grep.sh -E "a (cat|dog)"
[your_program] a cat
[stage-12] ✓ Received exit code 0.
[stage-12] $ echo "a dog" | ./your_grep.sh -E "a (cat|dog)"
[your_program] a dog
[stage-12] ✓ Received exit code 0.
[stage-12] $ echo "a cow" | ./your_grep.sh -E "a (cat|dog)"
[stage-12] ✓ Received exit code 1.
[stage-12] Test passed.
[stage-1] Running tests for Stage #1: init
[stage-1] $ echo "dog" | ./your_grep.sh -E "d"
[your_program] dog
[stage-1] ✓ Received exit code 0.
[stage-1] $ echo "dog" | ./your_grep.sh -E "f"
[stage-1] ✓ Received exit code 1.
[stage-1] Test passed.
Loading
Loading