reubeno / brush

bash/POSIX-compatible shell implemented in Rust
MIT License
27 stars 4 forks source link

fix: string replacement with slashes #231

Closed reubeno closed 1 month ago

reubeno commented 1 month ago

Fixes the case where a string replacement contains / chars, e.g.:

${value/pattern/some/replacement}
github-actions[bot] commented 1 month ago

Test Results

  2 files    9 suites   1m 6s ⏱️ 495 tests 495 ✅ 0 💤 0 ❌ 979 runs  979 ✅ 0 💤 0 ❌

Results for commit 2f46ef94.

github-actions[bot] commented 1 month ago

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.42 μs 3.42 μs 0.00 μs ⚪ Unchanged
instantiate_shell 60.30 μs 59.80 μs -0.50 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 31280.85 μs 30862.67 μs -418.18 μs ⚪ Unchanged
parse_bash_completion 2756.24 μs 2731.44 μs -24.80 μs ⚪ Unchanged
parse_sample_script 4.16 μs 4.22 μs 0.06 μs 🟠 +1.44%
run_echo_builtin_command 91.40 μs 90.88 μs -0.52 μs ⚪ Unchanged
run_one_builtin_command 109.68 μs 108.92 μs -0.76 μs ⚪ Unchanged
run_one_external_command 1938.94 μs 1982.11 μs 43.17 μs 🟠 +2.23%
run_one_external_command_directly 1008.83 μs 1036.82 μs 27.99 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
Overall Coverage 🟢 73.55% 🟢 73.55% ⚪ 0%

Minimum allowed coverage is 70%, this run produced 73.55%