85 Commits

Author SHA1 Message Date
Eric Huss
1b72e1fbf4 Fix intra-doc tests for renamed lint. 2020-08-01 09:52:11 -07:00
bors
dbbab42585 Auto merge of #8509 - ehuss:stabilize-crate-version, r=Eh2406
Stabilize -Z crate-versions

This stabilizes the `-Z crate-versions` flag which forwards the crate version to rustdoc so it can display the version in the sidebar.

The flag in rustdoc was stabilized in 1.44.

Closes #7907
2020-07-23 13:15:05 +00:00
Eric Huss
9e35ee1b93 Fix nightly tests for intra-doc links. 2020-07-22 19:11:01 -07:00
Eric Huss
3ce3d34071 Stabilize -Z crate-versions 2020-07-18 11:09:37 -07:00
Eric Huss
4ae79d2ffd Use fs helpers instead of File functions. 2020-04-17 07:56:16 -07:00
Alex Tokarev
d3b9d89a38 Use stabilized version of rustdoc's --crate-version
Since --crate-version flag of rustdoc was stabilized, there is no need to enable its unstable features when using it.
2020-03-26 01:17:45 +03:00
Alex Tokarev
c9e3141b0f Do not supply --crate-version flag to rustdoc if present in RUSTDOCFLAGS or extra compiler arguments 2020-03-18 21:26:49 +03:00
Eric Huss
517b59dbb4 Enable cargo doc --open tests on macos. 2020-02-25 08:13:30 -08:00
Alex Tokarev
1ea41babdc Add an option to include crate versions to the generated docs
Fixes https://github.com/rust-lang/cargo/issues/1681
2020-02-21 00:34:33 +03:00
Eric Huss
10e9bc9dfe Fix doc_target test which no longer works on stable/beta. 2020-01-20 11:16:53 -08:00
Eric Huss
2ad6b5413a Update tests for slight wording change in rustdoc error message. 2019-11-29 13:59:56 -08:00
Eric Huss
83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Lukas Kalbertodt
00b21c8b46
Add tests for documenting private items by default in binary crates 2019-11-21 22:14:42 +01:00
Alex Crichton
9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
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