From d53e56c491fbca34b877eaadd2c2879b2e9ca055 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Mon, 8 Jun 2020 23:55:27 -0700 Subject: [PATCH] Use $(...) instead of `...` in test scripts --- tests/common_infra.sh | 2 +- tests/libx52/test_brightness | 2 +- tests/libx52/test_indicator | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/common_infra.sh b/tests/common_infra.sh index 51ba327..02f9be6 100644 --- a/tests/common_infra.sh +++ b/tests/common_infra.sh @@ -72,7 +72,7 @@ X52_MFD_LINE_2_CLR_INDEX='00dc' find_programs() { # Tests and distcheck do not work on OSX, skip the tests - if [[ `uname -s` == [Dd]arwin* ]] + if [[ $(uname -s) == [Dd]arwin* ]] then echo "1..0 # skip Tests not supported on OSX" exit 0 diff --git a/tests/libx52/test_brightness b/tests/libx52/test_brightness index b136cd9..2e6d655 100755 --- a/tests/libx52/test_brightness +++ b/tests/libx52/test_brightness @@ -16,7 +16,7 @@ brightness_test() local index="\$X52_${unit}_BRIGHTNESS_INDEX" TEST_ID="Test setting $unit brightness to $bri" - expect_pattern `eval echo $index` $bri + expect_pattern $(eval echo $index) $bri $X52CLI bri $unit $bri diff --git a/tests/libx52/test_indicator b/tests/libx52/test_indicator index 5730dd0..0caf456 100755 --- a/tests/libx52/test_indicator +++ b/tests/libx52/test_indicator @@ -17,7 +17,7 @@ indicator_test() local value="\$X52_INDICATOR_STATE_${state}" TEST_ID="Test setting $indicator $state" - expect_pattern `eval echo $index $value` + expect_pattern $(eval echo $index $value) $X52CLI $indicator $state