From 1e8d1d1f65b0f01c56a9710e114fedb92cc5c18f Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 7 Oct 2025 09:54:25 -0600 Subject: [PATCH] Fixed Bash koan arithmetic tests. --- src/00_about_arithmetics.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/00_about_arithmetics.sh b/src/00_about_arithmetics.sh index a89a52e..746ce36 100644 --- a/src/00_about_arithmetics.sh +++ b/src/00_about_arithmetics.sh @@ -7,10 +7,13 @@ test_arithmetic_evaluation() { # shellcheck disable=SC2116 output=$(echo 1+1) - assertEqual "$output" __ + # `echo 1+1` is executed with the result given to `output` + # This is a demonstration of Bash command substitution. + assertEqual "$output" "1+1" output2=$((1+1)) - assertEqual $output2 __ + # Bash arithmetic, with "1+1" == 2 + assertEqual $output2 2 }