71 Commits

Author SHA1 Message Date
Eric Huss
ecf824f7b2 Update additional uses of --all.
- man pages
- Slightly reword deprecation notice.
- Include --all in man pages.
- Update some additional usages in code and docs.
2019-09-03 17:51:07 -07:00
Eric Huss
3c20a24335 Clean up some git test support functions. 2019-08-12 22:25:36 -07:00
Eric Huss
a59ea45c1a Fix documenting an example. 2019-06-08 14:18:51 -07:00
Jethro Beekman
0e0d968825 Update #[test] attribute on all tests in the testsuite
sed -i 's/^#\[test\]/#[cargo_test]/' $(rg -l '^#\[test\]')

Manual fixes:
* proc_macro::proc_macro_doctest
2019-06-07 12:41:26 -07:00
Eric Huss
87449f453b Remove unnecessary calls to masquerade_as_nightly_cargo.
These are not needed anymore.
2019-05-09 10:58:18 -07:00
Zach Lute
782266aaee Changed RUST_LOG usage to CARGO_LOG to avoid confusion. 2019-05-08 10:53:02 -07:00
Eric Huss
59af340d8f Allow cargo doc --open with multiple packages. 2019-03-31 15:47:03 -07:00
bors
a57b96dc52 Auto merge of #6786 - ehuss:remove-is_nightly-test-checks, r=dwijnand
Testsuite: remove some unnecessary is_nightly checks.
2019-03-26 23:45:46 +00:00
Eric Huss
50277e88fe Testsuite: remove some unnecessary is_nightly checks. 2019-03-26 13:56:14 -07:00
Eric Huss
27a95d0e74 Some fingerprint cleanup. 2019-03-26 13:22:49 -07:00
Eric Huss
a7fd6670d6 Relax some rustdoc tests. 2019-03-06 10:49:24 -08:00
Alexander Regueiro
f7c91ba622
Various cosmetic improvements. 2019-02-20 10:58:27 +00:00
Andy Russell
eda10a468c
relax rustdoc output assertion 2019-01-17 13:15:14 -05:00
Philipp Hansch
5e62437eb9
Remove a nightly check from doc tests 2018-12-13 07:55:08 +01:00
Alex Crichton
fecb724643 Format with cargo fmt 2018-12-08 03:19:47 -08:00
Dale Wijnand
04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
81a7f472ed
lang items need feature gates 2018-10-16 11:52:48 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
4da662d2be
Future proof an unstable test
statics (even extern ones) will get their type checked for a `Sized` bound in order to fix https://github.com/rust-lang/rust/issues/54410
2018-10-15 20:45:39 +02:00
Joel Gallant
2e9ea1e21c Fixes doc::doc_edition test output (too many spaces) 2018-09-20 16:09:55 -06:00
Joel Gallant
27c49ae015 Fixes verbose output tests 2018-09-20 14:55:09 -06:00
Guillaume Gomez
7b9255405f Add possibility to remove process exit code 2018-09-14 23:06:17 +02:00
Guillaume Gomez
9dcee5d663 Remove error code check in doc test 2018-09-14 23:05:35 +02:00
Eric Huss
1ef954ea1b Fix --document-private-items for multiple targets.
Closes #5958.
2018-09-13 06:19:35 -07:00
Zach Lute
b020d3789a Resolve merge conflicts with test string changes. 2018-09-09 16:48:57 -07:00
Dale Wijnand
d0679c7f8e
Specify crates.io is the default registry & print index 2018-09-08 09:25:41 +01:00
Zach Lute
89f43938fe Print file paths instead of file:// URLs.
This change ensures cargo will output file paths in the expected format
(C:\foo\... on Windows, /foo/... elsewhere). Previously it would output
file:// URLs instead.

To support this change, additional changes were made to the test suite
string processing such that [ROOT] is now replaced with the appropriate
file path root for the platform.

The CWD template was also updated to use [CWD] like other replacement
templates and to do the replacement on the expected value rather than
the actual value to avoid replacing things we don't expect with CWD.
2018-09-07 19:42:59 -07:00
Matthias Krüger
2cd9cce6e3 clippy: resolve all warnings about useless format!() 2018-09-03 11:38:29 +02:00
Dale Wijnand
d5fc8dc3a7
Introduce the CWD macro in test output asserting
Avoids dealing with things like CWD changing.
2018-08-30 11:05:29 +02:00
Dale Wijnand
570fe8927d
Remove hamcrest existing_file() 2018-08-29 10:26:12 +02:00
Dale Wijnand
6fd1b54c65
Remove hamcrest existing_dir() 2018-08-29 07:53:01 +02:00
Dale Wijnand
a173fc0abe
Replace .exec_with_output() usage with .with_stdout_contains 2018-08-29 00:45:19 +02:00
Dale Wijnand
85984a8700
Migrate from tests fom assert_that/execs to .run() 2018-08-28 15:08:12 +02:00
Dale Wijnand
b5ee3635ef
Wrap ProcessBuilder in Execs & make .cargo return that 2018-08-28 09:24:37 +01:00
Dale Wijnand
0152f26405
Move .env/.masquerade_as_nightly_cargo to collapse some more p.cargo calls 2018-08-18 21:34:09 +01:00
Dale Wijnand
511d4bc503
Collapse multiline ProcessBuilder::arg calls in tests
.. by calling this a bunch of times:

    fastmod --multiline '\.cargo\("([^"]+)"\).[ ]+\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/
2018-08-18 15:12:54 +01:00
Dale Wijnand
af4f1392f7
Collapse ProcessBuilder::arg calls in tests
.. with mutliple calls of:

    fastmod --accept-all '\.cargo\("([^"]+)"\)\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/

until no changes are left.
2018-08-18 15:05:45 +01:00
Dale Wijnand
3fdec5a2c6
Resolve a const_static_lifetime lint warning 2018-08-13 11:10:44 +01:00
bors
ae97799980 Auto merge of #5876 - matthiaskrgr:clippy_2, r=alexcrichton
fix a bunch of clippy warnings

 (invocation: cargo clippy --all-targets --all-features -- --cap-lints warn )
2018-08-12 22:42:53 +00:00
Matthias Krüger
8798bf0d28 fix a bunch of clippy warnings (invocation: cargo clippy --all-targets --all-features -- --cap-lints warn )
Special thanks to dwijnand for helping me with this! :)
2018-08-12 10:00:12 +02:00
Dale Wijnand
2c704d8841
Add a test for "cargo doc --message-format=short" 2018-08-10 08:49:15 +01:00
Eric Huss
c28823fa00 Update for review comments. 2018-08-09 15:43:34 -07:00
Eric Huss
f3faa976fa Support JSON with rustdoc.
This allows `cargo doc --message-format=json` to actually work.

Note that this explicitly does not attempt to support it for doctests for
several reasons:
- `rustdoc --test --error-format=json` does not work for some reason.
- Since the lib is usually compiled before running rustdoc, warnings/errors
  will be emitted correctly by rustc.
- I'm unaware of any errors/warnings `rustdoc --test` is capable of producing
  assuming the code passed `rustc`.
- The compilation of the tests themselves do not support JSON.
- libtest does not output json, so it's utility is limited.
2018-08-08 23:59:07 -07:00
Dale Wijnand
16aeb0cd4f
Default test support's Execs to exit code 0 2018-08-03 07:44:42 +01:00
Dale Wijnand
05400b8018
Drop the [/] test output macro 2018-08-02 10:18:48 +01:00
Dale Wijnand
67c52ffe58
Add tests for per-target edition
Test:
* enabling edition feature & setting at target level (happy path)
* overriding the package-level edition with per-target edition
* feature gating of per-target edition
* per-target edition usage for rustdoc
2018-07-31 14:49:33 +01:00
Dale Wijnand
ca7d9ee292
Declare one-line files on one line, in test projects 2018-07-25 09:58:50 +01:00
Dale Wijnand
ab19c48358
Dedup a bunch more manifest 2018-07-25 00:43:30 +01:00
Dale Wijnand
081e7930d2
Drop now unnecessary basic manifests 2018-07-24 16:33:55 +01:00
Dale Wijnand
43b42d6f4c
Reorganise the testsuite crate module hierarchy
* Collapse the nested cargotest::support module into the cargotest
  module (merge the mod.rs's)
* Rename the cargotest module to support
* Nest the top-level hamcrest module into support
2018-07-22 08:46:44 +01:00
Eric Huss
c3b477d495 Support --cap-lints in rustdoc. 2018-07-21 20:17:03 -07:00