rouge8 / neotest-rust

Neotest adapter for Rust, using cargo-nextest.
MIT License
91 stars 27 forks source link

Running a single test breaks on fish #53

Closed realeinherjar closed 12 months ago

realeinherjar commented 1 year ago

This is similar to #50 and also might have a similar fix to https://github.com/nvim-neotest/neotest-go/pull/9.

I am having this error while using fish shell and running :lua require("neotest").run.run():

fish: $/ is not a valid variable in fish.
cargo nextest run --workspace --no-fail-fast --config-file /var/folders/j5/fyvk84zx4r7fpgfpzs7my4m40000gn/T/nvim.storopoli/B0RHTL/9.nextest.toml --profile neotest --test wallet -E "package(bdk) & test(/^test_bump_fee_reduce_change$/)"

We need to scape the $ sign with \$:

cargo nextest run --workspace --no-fail-fast --config-file /var/folders/j5/fyvk84zx4r7fpgfpzs7my4m40000gn/T/nvim.storopoli/B0RHTL/9.nextest.toml --profile neotest --test wallet -E "package(bdk) & test(/^test_bump_fee_reduce_change\$/)"
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
    Finished test [unoptimized + debuginfo] target(s) in 0.15s
    Starting 1 test across 1 binary (121 skipped)
        FAIL [   0.022s] bdk::wallet test_bump_fee_reduce_change

--- STDOUT:              bdk::wallet test_bump_fee_reduce_change ---

running 1 test
test test_bump_fee_reduce_change ... FAILED

failures:

failures:
    test_bump_fee_reduce_change

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 121 filtered out; finished in 0.02s

--- STDERR:              bdk::wallet test_bump_fee_reduce_change ---
thread 'test_bump_fee_reduce_change' panicked at 'called `Result::unwrap()` on an `Err` value: FeeRateTooLow { required: FeeRate(2.9230769) }', crates/bdk/tests/wallet.rs:1445:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

------------
     Summary [   0.023s] 1 test run: 0 passed, 1 failed, 121 skipped
        FAIL [   0.022s] bdk::wallet test_bump_fee_reduce_change
error: test run failed