reubeno / brush

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

fix: assorted completion issues with ~ and vars #199

Closed reubeno closed 1 month ago

reubeno commented 1 month ago

Adds 5 new automated test cases for completion + gets them (mostly) passing:

(Note that we needed to leave 2 tests temporarily disabled as they pass only on certain versions of bash-completion. Rather than further complicate the PR; we will address them separately.)

This entailed:

github-actions[bot] commented 1 month ago

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.33 μs 3.33 μs 0.00 μs ⚪ Unchanged
instantiate_shell 60.25 μs 60.08 μs -0.17 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 29617.80 μs 29118.13 μs -499.66 μs 🟢 -1.69%
parse_bash_completion 2688.75 μs 2692.36 μs 3.61 μs ⚪ Unchanged
parse_sample_script 3.99 μs 3.97 μs -0.02 μs ⚪ Unchanged
run_echo_builtin_command 91.09 μs 90.45 μs -0.64 μs ⚪ Unchanged
run_one_builtin_command 110.43 μs 108.29 μs -2.14 μs ⚪ Unchanged
run_one_external_command 2063.83 μs 1918.44 μs -145.39 μs 🟢 -7.04%
run_one_external_command_directly 1019.37 μs 1014.30 μs -5.07 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/builtins/complete.rs 🔴 20.78% 🔴 21.85% 🟢 1.07%
brush-core/src/builtins/printf.rs 🟢 91.89% 🟢 91.3% 🔴 -0.59%
brush-core/src/commands.rs 🟢 87.91% 🟢 85.58% 🔴 -2.33%
brush-core/src/completion.rs 🔴 16.63% 🔴 19.22% 🟢 2.59%
brush-core/src/escape.rs 🟢 83.87% 🟢 85.95% 🟢 2.08%
brush-core/src/expansion.rs 🟢 95.64% 🟢 95.99% 🟢 0.35%
brush-core/src/interp.rs 🟢 90.18% 🟢 90.21% 🟢 0.03%
brush-core/src/jobs.rs 🔴 42.42% 🔴 37.23% 🔴 -5.19%
brush-core/src/patterns.rs 🟢 97.14% 🟢 97.85% 🟢 0.71%
brush-core/src/shell.rs 🟢 76.13% 🟢 76.43% 🟢 0.3%
brush-core/src/sys/unix/users.rs 🔴 13.16% 🔴 28.95% 🟢 15.79%
brush-shell/src/events.rs 🔴 36.46% 🔴 38.04% 🟢 1.58%
brush-shell/src/main.rs 🟢 89.61% 🟢 90.26% 🟢 0.65%
Overall Coverage 🟢 71.93% 🟢 72.15% 🟢 0.22%

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

github-actions[bot] commented 1 month ago

Test Results

  2 files    9 suites   56s :stopwatch: 452 tests 452 :white_check_mark: 0 :zzz: 0 :x: 895 runs  895 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 91bb798f.

:recycle: This comment has been updated with latest results.