From 06c7feeeb392338c287088658f7169b90038de18 Mon Sep 17 00:00:00 2001 From: Ryan <ryan-gg@outlook.com> Date: Fri, 24 May 2024 06:38:19 +0000 Subject: [PATCH] feat: update echo test to not send comma separated values --- internal/stage5.go | 2 +- internal/test_helpers/fixtures/base/pass | 8 ++++---- internal/test_helpers/fixtures/navigation/pass | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/stage5.go b/internal/stage5.go index e8aced54..d3d63065 100644 --- a/internal/stage5.go +++ b/internal/stage5.go @@ -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{ diff --git a/internal/test_helpers/fixtures/base/pass b/internal/test_helpers/fixtures/base/pass index 65b5d89d..68bec61a 100644 --- a/internal/test_helpers/fixtures/base/pass +++ b/internal/test_helpers/fixtures/base/pass @@ -62,12 +62,12 @@ Debug = true [33m[stage-5] [0m[94mRunning tests for Stage #5: iz3[0m [33m[stage-5] [0m[94mRunning ./spawn_shell.sh[0m [33m[your-program] [0m$ -[33m[stage-5] [0m[94m> echo pineapple, grape, raspberry[0m -[33m[your-program] [0mpineapple, grape, raspberry +[33m[stage-5] [0m[94m> echo pineapple grape[0m +[33m[your-program] [0mpineapple grape [33m[stage-5] [0m[92m✓ Received expected response[0m [33m[your-program] [0m$ -[33m[stage-5] [0m[94m> echo grape[0m -[33m[your-program] [0mgrape +[33m[stage-5] [0m[94m> echo grape apple[0m +[33m[your-program] [0mgrape apple [33m[stage-5] [0m[92m✓ Received expected response[0m [33m[your-program] [0m$ [33m[stage-5] [0m[92mTest passed.[0m diff --git a/internal/test_helpers/fixtures/navigation/pass b/internal/test_helpers/fixtures/navigation/pass index 67a57ebe..9de72d98 100644 --- a/internal/test_helpers/fixtures/navigation/pass +++ b/internal/test_helpers/fixtures/navigation/pass @@ -132,12 +132,12 @@ Debug = true [33m[stage-5] [0m[94mRunning tests for Stage #5: iz3[0m [33m[stage-5] [0m[94mRunning ./spawn_shell.sh[0m [33m[your-program] [0m$ -[33m[stage-5] [0m[94m> echo pear[0m -[33m[your-program] [0mpear +[33m[stage-5] [0m[94m> echo pear banana[0m +[33m[your-program] [0mpear banana [33m[stage-5] [0m[92m✓ Received expected response[0m [33m[your-program] [0m$ -[33m[stage-5] [0m[94m> echo mango, orange, pear, apple[0m -[33m[your-program] [0mmango, orange, pear, apple +[33m[stage-5] [0m[94m> echo mango orange pear[0m +[33m[your-program] [0mmango orange pear [33m[stage-5] [0m[92m✓ Received expected response[0m [33m[your-program] [0m$ [33m[stage-5] [0m[92mTest passed.[0m