refactor: argc test-functions (#26)

This commit is contained in:
sigoden
2024-06-06 15:30:41 +08:00
committed by GitHub
parent e810d566be
commit 26b4338b81
+4 -6
View File
@@ -148,13 +148,11 @@ test-functions() {
cmd="$(_lang_to_cmd "$lang")"
cmd_path="$BIN_DIR/$func$ext"
if command -v "$cmd" &> /dev/null; then
"$cmd_path" "$data" | {
echo "Test $cmd_path: $(cat)"
}
echo -n "Test $cmd_path: "
"$cmd_path" "$data"
if ! _is_win; then
"$cmd" "scripts/bin.$lang" "$func" "$data" | {
echo "Test $cmd scripts/bin.$lang $func: $(cat)"
}
echo -n "Test $cmd scripts/bin.$lang $func: "
"$cmd" "scripts/bin.$lang" "$func" "$data"
fi
fi
done