From 8e61965af6fb7f45c2a56fd0a32c8dc16b69750c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 17 Jun 2018 01:18:49 -0400 Subject: [PATCH] brace expansion tests --- test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test.sh b/test.sh index 13138c8..972579b 100755 --- a/test.sh +++ b/test.sh @@ -134,6 +134,17 @@ test_read_sleep() { assert_equals "$((result+1))" "$SECONDS" } +test_braces_expansion() { + printf -v result %s {a,{q,x}}c + assert_equals "$result" "acqcxc" +} + +test_numeric_sequence() { + printf -v result '%s ' {1..10} + assert_equals "$result" "1 2 3 4 5 6 7 8 9 10 " +} + + test_bar() { result="$(bar 50 10)" assert_equals "${result//$'\r'}" "[----- ]"