test(tests): avoid hardcoded missing path

This commit is contained in:
csh 2026-01-08 15:47:11 +08:00
parent 07583c8283
commit b529012c59
1 changed files with 4 additions and 1 deletions

View File

@ -214,7 +214,10 @@ teardown() {
@test "错误处理 - 目标目录不存在时报错" { @test "错误处理 - 目标目录不存在时报错" {
cd "$TARGET_DIR" cd "$TARGET_DIR"
run sh "$SCRIPT_PATH" /nonexistent/path tsl missing_dir="$TEST_DIR/missing-project"
rm -rf "$missing_dir"
run sh "$SCRIPT_PATH" "$missing_dir" tsl
[ "$status" -ne 0 ] [ "$status" -ne 0 ]
} }