diff --git a/internal/stage_wildcard.go b/internal/stage_wildcard.go index d97ae46..ff0cd35 100644 --- a/internal/stage_wildcard.go +++ b/internal/stage_wildcard.go @@ -21,6 +21,11 @@ func testWildcard(stageHarness *test_case_harness.TestCaseHarness) error { Input: "car", ExpectedExitCode: 1, }, + { + Pattern: "c.+t", + Input: "coat", + ExpectedExitCode: 0, + }, } return RunTestCases(testCases, stageHarness) diff --git a/internal/test_helpers/fixtures/alternation/success b/internal/test_helpers/fixtures/alternation/success index b674063..83790d9 100644 --- a/internal/test_helpers/fixtures/alternation/success +++ b/internal/test_helpers/fixtures/alternation/success @@ -18,6 +18,9 @@ [stage-11] ✓ Received exit code 0. [stage-11] $ echo -n "car" | ./your_grep.sh -E "c.t" [stage-11] ✓ Received exit code 1. +[stage-11] $ echo -n "coat" | ./your_grep.sh -E "c.+t" +[your_program] coat +[stage-11] ✓ Received exit code 0. [stage-11] Test passed. [stage-10] Running tests for Stage #10: ny8 diff --git a/internal/test_helpers/fixtures/backreferences_multiple/success b/internal/test_helpers/fixtures/backreferences_multiple/success index 5646be6..acc46f9 100644 --- a/internal/test_helpers/fixtures/backreferences_multiple/success +++ b/internal/test_helpers/fixtures/backreferences_multiple/success @@ -100,6 +100,9 @@ [stage-11] ✓ Received exit code 0. [stage-11] $ echo -n "car" | ./your_grep.sh -E "c.t" [stage-11] ✓ Received exit code 1. +[stage-11] $ echo -n "coat" | ./your_grep.sh -E "c.+t" +[your_program] coat +[stage-11] ✓ Received exit code 0. [stage-11] Test passed. [stage-10] Running tests for Stage #10: ny8 diff --git a/internal/test_helpers/fixtures/backreferences_nested/success b/internal/test_helpers/fixtures/backreferences_nested/success index 5561745..17b62b0 100644 --- a/internal/test_helpers/fixtures/backreferences_nested/success +++ b/internal/test_helpers/fixtures/backreferences_nested/success @@ -141,6 +141,9 @@ [stage-11] ✓ Received exit code 0. [stage-11] $ echo -n "car" | ./your_grep.sh -E "c.t" [stage-11] ✓ Received exit code 1. +[stage-11] $ echo -n "coat" | ./your_grep.sh -E "c.+t" +[your_program] coat +[stage-11] ✓ Received exit code 0. [stage-11] Test passed. [stage-10] Running tests for Stage #10: ny8 diff --git a/internal/test_helpers/fixtures/backreferences_single/success b/internal/test_helpers/fixtures/backreferences_single/success index 663d229..e7dad93 100644 --- a/internal/test_helpers/fixtures/backreferences_single/success +++ b/internal/test_helpers/fixtures/backreferences_single/success @@ -59,6 +59,9 @@ [stage-11] ✓ Received exit code 0. [stage-11] $ echo -n "car" | ./your_grep.sh -E "c.t" [stage-11] ✓ Received exit code 1. +[stage-11] $ echo -n "coat" | ./your_grep.sh -E "c.+t" +[your_program] coat +[stage-11] ✓ Received exit code 0. [stage-11] Test passed. [stage-10] Running tests for Stage #10: ny8 diff --git a/internal/test_helpers/fixtures/wildcard/success b/internal/test_helpers/fixtures/wildcard/success index 8f95556..8de626e 100644 --- a/internal/test_helpers/fixtures/wildcard/success +++ b/internal/test_helpers/fixtures/wildcard/success @@ -7,6 +7,9 @@ [stage-11] ✓ Received exit code 0. [stage-11] $ echo -n "car" | ./your_grep.sh -E "c.t" [stage-11] ✓ Received exit code 1. +[stage-11] $ echo -n "coat" | ./your_grep.sh -E "c.+t" +[your_program] coat +[stage-11] ✓ Received exit code 0. [stage-11] Test passed. [stage-10] Running tests for Stage #10: ny8