assert-rs / completest Goto Github PK
View Code? Open in Web Editor NEWRun completions for your program
Home Page: https://docs.rs/completest
License: Apache License 2.0
Run completions for your program
Home Page: https://docs.rs/completest
License: Apache License 2.0
Continuing discussion at #6 (comment)
The problem: By construing the home
parameter as my actual $HOME directory, I accidentally overwrote the .zshenv
file in it because completest creates a file of such a name there unconditionally. I think it’s a papercut that it would be nice to clarify.
The suggested solution:
new()
because more specific names tend to be more descriptive (IMO, of course).with_temp_workdir(bin_root)
that creates a temporary workdir automatically.bin_root
to something like shell_binary_dir_path
.EDIT: Clarify the problem.
A bin_root
parameter isn't sufficient.
We should probably move it to a push_path(&mut self, path)
or something.
See #6
To simplify tests using completest, I'd like to have an ability to set PS1=""
. Currently I'm forced to take into account the configured prompt (%
) in my assertions.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
nu-cli
, nu-cmd-lang
, nu-command
, nu-parser
, nu-protocol
, nu-test-support
, reedline
)crates/completest-nu/Cargo.toml
dunce 1.0.4
nu-cli 0.88.1
nu-command 0.88.1
nu-parser 0.88.1
nu-protocol 0.88.1
nu-test-support 0.88.1
nu-cmd-lang 0.88.1
reedline 0.27.1
crates/completest-pty/Cargo.toml
ptyprocess 0.4.1
vt100 0.15.2
.github/workflows/audit.yml
actions/checkout v4
actions-rs/audit-check v1
actions/checkout v4
EmbarkStudios/cargo-deny-action v2
.github/workflows/ci.yml
actions/checkout v4
Swatinem/rust-cache v2
actions/checkout v4
Swatinem/rust-cache v2
actions/checkout v4
actions/checkout v4
Swatinem/rust-cache v2
actions/checkout v4
Swatinem/rust-cache v2
actions/checkout v4
Swatinem/rust-cache v2
actions/checkout v4
Swatinem/rust-cache v2
github/codeql-action v3
actions/checkout v4
Swatinem/rust-cache v2
.github/workflows/committed.yml
actions/checkout v4
.github/workflows/pre-commit.yml
actions/checkout v4
actions/setup-python v5
pre-commit/action v3.0.1
.github/workflows/rust-next.yml
actions/checkout v4
Swatinem/rust-cache v2
actions/checkout v4
Swatinem/rust-cache v2
.github/workflows/spelling.yml
actions/checkout v4
.github/workflows/ci.yml
STABLE 1.80
STABLE 1.80
STABLE 1.80
Hi 👋
I’m on macOS, trying to write a simple test case. This just outputs a bunch of files from the current directory, not bar
, as it should have. When I source
the completion script from the shell, it works fine.
#[test]
fn completest_reduction() {
let script = r#"
#compdef foo
_foo () {
compadd bar
return 0
}
compdef _foo foo
"#;
let term = completest::Term::new();
let mut runtime = completest::ZshRuntime::new(PathBuf::from_str("/opt/homebrew/bin/zsh").unwrap(), PathBuf::from_str("./completest-temporary-directory").unwrap()).unwrap();
runtime.register("foo", &script).unwrap();
let output = runtime.complete("foo \t", &term).unwrap();
dbg!(output);
}
Running unittests src/main.rs (target/debug/deps/complgen-fd528e5e370143a6)
running 1 test
[src/zsh.rs:404] output = "adaszko@pryk complgen % foo\nCONTRIBUTING.md e2e/ psql.usage\nCargo.lock examples/ psql.zsh\nCargo.toml help.usage pytest.ini\nLICENSE help.zsh run-e2e-tests.bash*\nREADME.md lsof.bash src/\nassets/ lsof.zsh strace.fish\ncapture_postamble.zsh my.bash strace.usage\ncapture_preamble.zsh my.fish strace.zsh\ncargo.fish my.usage target/\ncompletest-temporary-directory/ my.zsh usage/\ndfa.dot pgservice.conf venv/\ndfa.svg proptest-regressions/"
test zsh::tests::completest_reduction ... ok
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.