From 27f42bd387cb27254a5ff3395cb819ffd3f4f293 Mon Sep 17 00:00:00 2001 From: Denis Silakov Date: Fri, 19 Jan 2024 13:56:15 +0300 Subject: [PATCH] Fix style of Shell scripts Issue: #I8YLSX Signed-off-by: Denis Silakov --- tests/runtime/common/fortest/verify.sh | 2 +- tests/runtime/common/helloworld/verify.sh | 2 +- tests/runtime/common/module/verify.sh | 2 +- tests/runtime/common/recursive_array/verify.sh | 4 ++-- tests/runtime/common/spread_primitives/verify.sh | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/runtime/common/fortest/verify.sh b/tests/runtime/common/fortest/verify.sh index de8385ae6..1227b3124 100755 --- a/tests/runtime/common/fortest/verify.sh +++ b/tests/runtime/common/fortest/verify.sh @@ -31,4 +31,4 @@ else echo -e "actual:"$actual echo -e "\033[31mfortest test failed\033[0m" exit 1; -fi \ No newline at end of file +fi diff --git a/tests/runtime/common/helloworld/verify.sh b/tests/runtime/common/helloworld/verify.sh index 6a9add2a4..e1333a763 100755 --- a/tests/runtime/common/helloworld/verify.sh +++ b/tests/runtime/common/helloworld/verify.sh @@ -12,4 +12,4 @@ else echo -e "actual:"$actual echo -e "\033[31mhelloworld test failed\033[0m" exit 1; -fi \ No newline at end of file +fi diff --git a/tests/runtime/common/module/verify.sh b/tests/runtime/common/module/verify.sh index 83cb247aa..34f366989 100755 --- a/tests/runtime/common/module/verify.sh +++ b/tests/runtime/common/module/verify.sh @@ -12,4 +12,4 @@ else echo -e "actual:"$actual echo -e "\033[31m module test failed\033[0m" exit 1; -fi \ No newline at end of file +fi diff --git a/tests/runtime/common/recursive_array/verify.sh b/tests/runtime/common/recursive_array/verify.sh index 51a7771b1..26164ef81 100644 --- a/tests/runtime/common/recursive_array/verify.sh +++ b/tests/runtime/common/recursive_array/verify.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved. +# Copyright (c) Huawei Technologies Co., Ltd. 2022-2024. All rights reserved. set -eo pipefail @@ -8,7 +8,7 @@ expected=" 2,1,4,,5,1,3 4,2,1,,1,3,5" -actual=`cat $1` +actual=$(cat "$1") if [[ "$actual" == "$expected" ]];then exit 0; else diff --git a/tests/runtime/common/spread_primitives/verify.sh b/tests/runtime/common/spread_primitives/verify.sh index bf81e70f4..09cc29ed0 100644 --- a/tests/runtime/common/spread_primitives/verify.sh +++ b/tests/runtime/common/spread_primitives/verify.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved. +# Copyright (c) Huawei Technologies Co., Ltd. 2022-2024. All rights reserved. set -eo pipefail @@ -26,7 +26,7 @@ s TypeError: null is not iterable TypeError: undefined is not iterable" -actual=`cat $1` +actual=$(cat "$1") if [[ "$actual" == "$expected" ]];then exit 0; else -- Gitee