Skip to content

Commit

Permalink
feat: update echo test to not send comma separated values
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed May 24, 2024
1 parent 53816a3 commit 06c7fee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/stage5.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func testEcho(stageHarness *test_case_harness.TestCaseHarness) error {
}

for i := 0; i < numberOfCommands; i++ {
words := strings.Join(random.RandomWords(random.RandomInt(1, 5)), ", ")
words := strings.Join(random.RandomWords(random.RandomInt(2, 4)), " ")
command := fmt.Sprintf("echo %s", words)

testCase := test_cases.RegexTestCase{
Expand Down
8 changes: 4 additions & 4 deletions internal/test_helpers/fixtures/base/pass
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ Debug = true
[stage-5] Running tests for Stage #5: iz3
[stage-5] Running ./spawn_shell.sh
[your-program] $
[stage-5] > echo pineapple, grape, raspberry
[your-program] pineapple, grape, raspberry
[stage-5] > echo pineapple grape
[your-program] pineapple grape
[stage-5] ✓ Received expected response
[your-program] $
[stage-5] > echo grape
[your-program] grape
[stage-5] > echo grape apple
[your-program] grape apple
[stage-5] ✓ Received expected response
[your-program] $
[stage-5] Test passed.
Expand Down
8 changes: 4 additions & 4 deletions internal/test_helpers/fixtures/navigation/pass
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ Debug = true
[stage-5] Running tests for Stage #5: iz3
[stage-5] Running ./spawn_shell.sh
[your-program] $
[stage-5] > echo pear
[your-program] pear
[stage-5] > echo pear banana
[your-program] pear banana
[stage-5] ✓ Received expected response
[your-program] $
[stage-5] > echo mango, orange, pear, apple
[your-program] mango, orange, pear, apple
[stage-5] > echo mango orange pear
[your-program] mango orange pear
[stage-5] ✓ Received expected response
[your-program] $
[stage-5] Test passed.
Expand Down

0 comments on commit 06c7fee

Please sign in to comment.