17 Commits

Author SHA1 Message Date
Dale Wijnand
f8c9928cc1
Rework some test projects to use the "foo" default
Generally that means either switching "foo" and "bar" around (reversing
the arrow), or it means push "foo" to "bar" (and sometimes "bar" to
"baz", etc..) to free up "foo".

For trivia that leaves 80/1222 outliers, therefore 93.4% of test
project use the default. :)
2018-07-21 19:40:45 +01:00
Dale Wijnand
7fe2fbc8a3
Remove the argument from the project test support function
By rewriting the tests, with rerast (https://github.com/google/rerast),
to use the newly introduced "at" method.

First I added the following temporary function to cargotest::support:

    pub fn project_foo() -> ProjectBuilder {
        project("foo")
    }

Then I defined the following rewrite.rs:

    use cargotest::support::{ project, project_foo };

    fn rule1(a: &'static str) {
        replace!(project("foo") => project_foo());
        replace!(project(a) => project_foo().at(a));
    }

Then I ran rerast:

    cargo +nightly rerast --rules_file=rewrite.rs --force --targets tests --file tests/testsuite/main.rs

Finally I searched and replaced the references to project_foo with
argument-less project (a little awkardly on macOS with a git clean).

    find tests -type f -exec sed -i -e 's/project_foo/project/g' {} +
    git clean -d tests
2018-07-20 13:31:50 +01:00
Andy Russell
9e41e383ac
help: display external subcommand help 2018-07-13 15:09:00 -04:00
Klaus Purer
9af095adab tests(help): Fix assertion by using the full line text 2018-03-31 11:33:14 +02:00
Klaus Purer
a4104914ea tests(help): Add test for -Z help output 2018-03-31 11:19:28 +02:00
Aleksey Kladov
deb1c1e15c Fix regression when passing arguments to subcommands 2018-03-20 03:34:37 +03:00
Aleksey Kladov
a1735c7aff Regression tests for #5201
Better safe than sorry!
2018-03-19 23:51:49 +03:00
Aleksey Kladov
b0c181d91c Prettify rustfmted single-line strings 2018-03-14 17:48:44 -07:00
Alex Crichton
1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
Aleksey Kladov
a64df78ea6 Relax tests for windows
On windows, clap prints `cargo.exe` rather than just `cargo`.
2018-03-10 18:46:32 +03:00
Aleksey Kladov
cc3ce0007d Fix --explain 2018-03-08 23:31:56 +03:00
Aleksey Kladov
0470d77575 Support list subcommand
All tests are green 🎉
2018-03-08 23:31:56 +03:00
Aleksey Kladov
af88c9f203 Disable cargo help -h 2018-03-08 23:31:56 +03:00
Aleksey Kladov
81ce3e1bef Support external subcommands 2018-03-08 23:31:56 +03:00
Aleksey Kladov
c327245ca5 Drop old commands 2018-03-08 23:31:56 +03:00
Aleksey Kladov
178b16d12b Temporarly ignore some tests 2018-03-08 23:30:46 +03:00
André Rocha
98f17bcc56 Adding cargo.rs file tests as cargo_command.rs. 2018-02-21 13:33:52 -05:00