Closed magicant closed 4 months ago
This comprehensive update improves code maintainability and test integrity by centralizing various environment variable references into constants and reorganizing test helper imports. No functional changes or updates to exported entities have been introduced.
Files/Groups | Change Summary |
---|---|
check-extra.sh , check-msrv.sh |
Added and updated cargo commands; no changes to exported/public entities. |
yash-builtin/... |
Replaced string literals with constants for environment variables (e.g., PWD , OLDPWD , PATH ), and standardized imports from yash_env_test_helper . |
yash-builtin/src/.../tests.rs , yash-semantics/... |
Moved assert_stderr , assert_stdout , in_virtual_system , and other test utilities from local modules to yash_env_test_helper . |
yash-semantics/src/expansion/initial/arith.rs |
Updated import of in_virtual_system from yash_env_test_helper . |
yash-builtin/src/lib.rs |
Merged tests module into the parent module in lib.rs and referenced BUILTINS directly in tests. |
yash-builtin/src/getopts.rs , yash-builtin/src/... |
Amended to use new constants like OPTIND , OPTARG from yash_env::variable module instead of hard-coded strings. |
sequenceDiagram
participant Script
participant EnvHelper as yash_env_test_helper
participant Env as yash_env::variable
Script->>EnvHelper: use yash_env_test_helper::assert_stderr;
Script->>Env: use yash_env::variable::PWD;
Script->>Env: use yash_env::variable::OLDPWD;
Script->>Env: get or create variable references using constants
In the code's great library hall, Constants stand firm and tall. No more strings scattered wide, In neat rows, they now reside. Tests aligned with helper might, Making code a clearer sight. Celebrate, for now we say, Order's come to light our way! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Refactor
yash_env_test_helper
.Chores
Cargo.toml
dependencies, specifically addingyash-env-test-helper
.yash_env_test_helper
consistently across multiple modules.