Phase 15.5 Core Box削除後の新テストシステム構築: ## 実装内容 - スモークテストv2システム完全実装(3段階プロファイル) - 共通ライブラリ(test_runner/plugin_manager/result_checker/preflight) - インタープリター層完全削除(約350行) - PyVM重要インフラ特化保持戦略(JSON v0ブリッジ専用) - nyash.tomlパス修正(13箇所、プラグイン正常ロード確認) ## 動作確認済み - 基本算術演算(+, -, *, /) - 制御構文(if, loop, break, continue) - 変数代入とスコープ - プラグインロード(20個の.soファイル) ## 既知の問題 - StringBox/IntegerBoxメソッドが動作しない - オブジェクト生成は成功するがメソッド呼び出しでエラー - Phase 15.5影響でプラグイン実装が不完全な可能性 ## ドキュメント - docs/development/testing/smoke-tests-v2.md 作成 - docs/reference/pyvm-usage-guidelines.md 作成 - CODEX_QUESTION.md(Codex相談用)作成 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.3 KiB
Bash
54 lines
1.3 KiB
Bash
#!/bin/bash
|
||
# set -eは使わない(個々のテストが失敗しても続行するため)
|
||
# stringbox_basic.sh - StringBoxの基本操作テスト
|
||
|
||
# 共通ライブラリ読み込み(必須)
|
||
source "$(dirname "$0")/../../../lib/test_runner.sh"
|
||
source "$(dirname "$0")/../../../lib/result_checker.sh"
|
||
|
||
# 環境チェック(必須)
|
||
require_env || exit 2
|
||
|
||
# プラグイン整合性チェック(必須)
|
||
preflight_plugins || exit 2
|
||
|
||
# テスト実装
|
||
test_stringbox_new() {
|
||
local script='
|
||
local s
|
||
s = new StringBox("Hello")
|
||
print(s)
|
||
'
|
||
local output
|
||
output=$(run_nyash_vm -c "$script" 2>&1)
|
||
check_exact "Hello" "$output" "stringbox_new"
|
||
}
|
||
|
||
test_stringbox_length() {
|
||
local script='
|
||
local s
|
||
s = new StringBox("Nyash")
|
||
print(s.length())
|
||
'
|
||
local output
|
||
output=$(run_nyash_vm -c "$script" 2>&1)
|
||
check_exact "5" "$output" "stringbox_length"
|
||
}
|
||
|
||
test_stringbox_concat() {
|
||
local script='
|
||
local s1, s2, result
|
||
s1 = new StringBox("Hello")
|
||
s2 = new StringBox(" World")
|
||
result = s1.concat(s2)
|
||
print(result)
|
||
'
|
||
local output
|
||
output=$(run_nyash_vm -c "$script" 2>&1)
|
||
check_exact "Hello World" "$output" "stringbox_concat"
|
||
}
|
||
|
||
# テスト実行
|
||
run_test "stringbox_new" test_stringbox_new
|
||
run_test "stringbox_length" test_stringbox_length
|
||
run_test "stringbox_concat" test_stringbox_concat |