From bb62b974b6ee281a517e9ea93da174abb63fa3be Mon Sep 17 00:00:00 2001 From: elijahr Date: Tue, 9 Apr 2024 19:02:28 -0500 Subject: [PATCH] Fix tests --- lib/tools.bash | 10 ++-------- test/check.bats | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/tools.bash b/lib/tools.bash index 74e557e..476fe6d 100644 --- a/lib/tools.bash +++ b/lib/tools.bash @@ -347,12 +347,6 @@ run_tool_shfmt() { printf " ↳ %s%s%s\n" "${tool}" "${DOTS:offset}" "ok" fi else - echo ">>> $path" - cat "${path}" - echo "<<< $path" - echo ">>> original" - echo "${original}" - echo "<<< original" status=0 printf " ↳ %s%s%s\n" "${tool}" "${DOTS:offset}" "wrote" fi @@ -482,8 +476,8 @@ run_tool_uncrustify() { IFS= read -r stderr < <(mktemp) status=0 - cmd=$(interpolate \ - "tool" "uncrustify" \ + readarray -t cmd < <(interpolate \ + "tool" "${LINTBALL_DIR}/tools/bin/uncrustify" \ "lintball_dir" "${LINTBALL_DIR}" \ "lang" "${lang}" \ "path" "${path}" \ diff --git a/test/check.bats b/test/check.bats index f8f9ed3..8319658 100644 --- a/test/check.bats +++ b/test/check.bats @@ -24,7 +24,7 @@ teardown() { run lintball fix # 3>&- assert_success assert [ "$(echo "${output}" | grep -cF " ↳ prettier...........................wrote" -c)" -eq 2 ] - assert [ "$(echo "${output}" | grep -cF " ↳ yamllint...........................wrote" -c)" -eq 1 ] + assert [ "$(echo "${output}" | grep -cF " ↳ yamllint...........................ok" -c)" -eq 1 ] run lintball check # 3>&- assert_success assert [ "$(echo "${output}" | grep -cF " ↳ prettier...........................ok" -c)" -eq 2 ]