phase29ao(p39): release adopt pattern2 break subset

This commit is contained in:
2025-12-30 18:04:39 +09:00
parent 46834f3aec
commit b105f82547
10 changed files with 80 additions and 5 deletions

View File

@ -20,6 +20,7 @@ run_filter() {
run_filter "pattern2" "phase29ab_pattern2_" || exit 1
run_filter "pattern2_realworld" "phase263_pattern2_" || exit 1
run_filter "pattern2_subset" "phase29ai_pattern2_break_plan_subset_ok_min_vm" || exit 1
run_filter "pattern2_release_adopt_vm" "phase29ao_pattern2_release_adopt_vm" || exit 1
run_filter "pattern3_ifphi_vm" "phase118_pattern3_if_sum_vm" || exit 1
run_filter "pattern1_strict_shadow_vm" "phase29ao_pattern1_strict_shadow_vm" || exit 1
run_filter "pattern1_subset_reject_extra_stmt_vm" "phase29ao_pattern1_subset_reject_extra_stmt_vm" || exit 1

View File

@ -0,0 +1,31 @@
#!/bin/bash
# phase29ao_pattern2_release_adopt_vm.sh - Pattern2 release adopt path smoke (VM)
#
# Expected:
# - Exit code 15
source "$(dirname "$0")/../../../lib/test_runner.sh"
require_env || exit 2
FIXTURE="$NYASH_ROOT/apps/tests/phase29ai_pattern2_break_plan_subset_ok_min.hako"
RUN_TIMEOUT_SECS=${RUN_TIMEOUT_SECS:-10}
set +e
OUTPUT=$(timeout "$RUN_TIMEOUT_SECS" env -u HAKO_JOINIR_STRICT -u NYASH_JOINIR_STRICT NYASH_DISABLE_PLUGINS=1 "$NYASH_BIN" "$FIXTURE" 2>&1)
EXIT_CODE=$?
set -e
if [ "$EXIT_CODE" -eq 124 ]; then
test_fail "phase29ao_pattern2_release_adopt_vm: hakorune timed out (>${RUN_TIMEOUT_SECS}s)"
exit 1
fi
if [ "$EXIT_CODE" -ne 15 ]; then
echo "[FAIL] Expected exit 15, got $EXIT_CODE"
echo "$OUTPUT" | tail -n 40 || true
test_fail "phase29ao_pattern2_release_adopt_vm: Unexpected RC"
exit 1
fi
test_pass "phase29ao_pattern2_release_adopt_vm: PASS (exit=15)"
exit 0