Skip to content
Open
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
7 changes: 5 additions & 2 deletions src/00_about_arithmetics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

}