danielpclark / faster_path

Faster Pathname handling for Ruby written in Rust
MIT License
780 stars 29 forks source link

basename trims `..` on ext `.*` #162

Closed danielpclark closed 6 years ago

danielpclark commented 6 years ago

I've got a fix, it's slightly slower. But I'm adding the Rust benchmark system back in so we can fiddle with it.

TEST

assert_eq!("..", basename("..", ".*"));

OUTPUT

failures:

---- basename::dots stdout ----
    thread 'basename::dots' panicked at 'assertion failed: `(left == right)`
  left: `".."`,
 right: `"."`', src/basename.rs:56:3
note: Run with `RUST_BACKTRACE=1` for a backtrace.

failures:
    basename::dots