Skip to content

test(aot): add ltrim/rtrim PHPT for LLVM compile-and-run#293

Merged
PurHur merged 1 commit into
masterfrom
feat/aot-ltrim-rtrim-phpt
May 19, 2026
Merged

test(aot): add ltrim/rtrim PHPT for LLVM compile-and-run#293
PurHur merged 1 commit into
masterfrom
feat/aot-ltrim-rtrim-phpt

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 19, 2026

Summary

  • Add test/fixtures/aot/cases/ltrim_rtrim.phpt exercising ltrim() / rtrim() with the default whitespace mask through bin/compile.php (LLVM AOT link + native run).
  • Update docs/capabilities.md to record AOT PHPT coverage for both builtins.

Test output (Docker php-compiler:22.04-dev, LLVM 9 at /opt/llvm9)

docs/capabilities.md is up to date (105 builtins).
OK (41 tests, 46 assertions)   # test/aot/AotTest.php (was 40)
OK (2 tests, 16 assertions)    # test/aot/ExampleWebAotTest.php

Run locally:

./script/docker-ci-local.sh
# or subset:
tar -cf - --exclude='.git' --exclude='.llvm' . | docker run --rm -i -w /compiler \
  -e PHP_COMPILER_LLVM_PATH=/opt/llvm9 -e LD_LIBRARY_PATH=/opt/llvm9 \
  php-compiler:22.04-dev bash -c 'tar -xf - >/dev/null && script/apply-patches.sh >/dev/null && \
  php vendor/bin/phpunit test/aot/AotTest.php'

Test plan

  • php script/capability-matrix.php --check
  • phpunit test/aot/AotTest.php (41/41)
  • phpunit test/aot/ExampleWebAotTest.php (2/2)

Made with Cursor

Exercise default-mask ltrim() and rtrim() through bin/compile.php AOT
fixtures and record AOT PHPT coverage in the capability matrix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit a516ca3 into master May 19, 2026
@PurHur PurHur deleted the feat/aot-ltrim-rtrim-phpt branch May 19, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant