Files
hakorune/local_tests/test_filebox_nonexist.nyash
Moe Charm 2b2dcc5647 feat(phase-9.75f-1): Complete FileBox dynamic library implementation
- Implement C ABI plugin system with workspace configuration
- Create FileBox plugin with full read/write/exists/toString support
- Fix critical memory management issues (double free) with Arc
- Add comprehensive test suite for dynamic FileBox functionality
- Achieve 98% build time improvement for plugin (2.87s vs 2-3min)
- Maintain full backward compatibility with feature flags

FileBox now loads dynamically, drastically reducing build times while
maintaining all functionality. Next: Math/Time dynamic migration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 09:31:35 +09:00

34 lines
1021 B
Plaintext

// FileBox 存在しないファイルの読み込みテスト
static box Main {
init { console }
main() {
me.console = new ConsoleBox()
me.console.log("📂 存在しないファイルのテスト")
// 存在しないファイルを開く
local file
file = new FileBox("does_not_exist.txt")
// 存在確認
local exists
exists = file.exists()
me.console.log("ファイル存在: " + exists.toString())
// 読み込み試行
local content
content = file.read()
me.console.log("読み込み結果: " + content.toString())
// 書き込んでから再度読み込み
file.write("Created by Nyash!")
exists = file.exists()
me.console.log("書き込み後の存在: " + exists.toString())
content = file.read()
me.console.log("書き込み後の内容: " + content.toString())
return "done"
}
}