From 81250ad76bbd336a262da71f4f71d6a37b68bd74 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sat, 29 Jan 2022 18:29:45 -0500 Subject: Add for and while loop support (w/o declarations in `for`) We can now loop and do stuff, yay! However, we don't yet allow declarations inside the for-loop initializer, since that is a bit more annoying to implement. --- tests/loops.sh | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100755 tests/loops.sh (limited to 'tests') diff --git a/tests/loops.sh b/tests/loops.sh new file mode 100755 index 0000000..3fea60f --- /dev/null +++ b/tests/loops.sh @@ -0,0 +1,118 @@ +#!/bin/bash + +. tests/common.sh + +set -e + +echo -n "- While loops: " +assert_exit_status_stdin 5 <