| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2024-08-13 | Improve code readability | Guillaume Gomez | -0/+9 | |
| 2024-08-13 | If there are crate attributes, we prevent doctest to be merged with others | Guillaume Gomez | -27/+4 | |
| 2024-08-13 | Rename `DocTest` into `DocTestBuilder` | Guillaume Gomez | -9/+14 | |
| 2024-08-13 | Reduce merged doctest source code size | Guillaume Gomez | -25/+7 | |
| 2024-08-13 | Add documentation on `DocTest` and `RunnableDoctest` structs | Guillaume Gomez | -0/+2 | |
| 2024-08-13 | Improve code by removing unneeded function arguments | Guillaume Gomez | -2/+0 | |
| 2024-08-13 | Correctly handle macros using `$crate` in merged doctests | Guillaume Gomez | -3/+14 | |
| 2024-08-13 | If no argument is provided to merged doctests binary, they will be run in ↵ | Guillaume Gomez | -6/+4 | |
| the same process (needed for miri) | ||||
| 2024-08-13 | Correctly handle `internal_features` attribute | Guillaume Gomez | -1/+13 | |
| 2024-08-13 | Don't change indent in merged doctests | Guillaume Gomez | -1/+1 | |
| 2024-08-13 | Make merged doctests run in their own process | Guillaume Gomez | -15/+81 | |
| 2024-08-13 | Fix weird memory allocation failure in merged doctests by storing doctest ↵ | Guillaume Gomez | -8/+8 | |
| list into a const | ||||
| 2024-08-13 | Don't merge doctests with `#[global_allocator]` | Guillaume Gomez | -75/+70 | |
| 2024-08-13 | Greatly improve handling of doctests attributes, making it possible to merge ↵ | Guillaume Gomez | -45/+112 | |
| doctests more efficiently | ||||
| 2024-08-13 | Simplify `has_main_fn` to be a boolean instead of a `Option<Span>` | Guillaume Gomez | -29/+31 | |
| 2024-08-13 | Correctly handle doctests with invalid AST | Guillaume Gomez | -4/+17 | |
| 2024-08-13 | If there is any AST error with a doctest, we make it a standalone test | Guillaume Gomez | -88/+182 | |
| To do so, AST error detection was improved in order to not filter out too many doctests. | ||||
| 2024-08-13 | Prevent merged doctests to break stdin if the generated file is too big | Guillaume Gomez | -3/+8 | |
| 2024-08-13 | Split doctests into two categories: mergeable ones and standalone ones | Guillaume Gomez | -22/+56 | |
| 2024-08-13 | Split standalone and mergeable doctests | Guillaume Gomez | -19/+208 | |
| 2024-08-13 | Split doctests between standalone and mergeable ones | Guillaume Gomez | -6/+4 | |
| 2024-08-13 | Simplify doctest tests | Guillaume Gomez | -27/+24 | |
| 2024-08-13 | Add `DocTest` type | Guillaume Gomez | -130/+181 | |
| 2024-08-13 | Clean up rustdoc make_test function code | Guillaume Gomez | -21/+21 | |
| 2024-07-29 | Reformat `use` declarations. | Nicholas Nethercote | -3/+6 | |
| The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options. | ||||
| 2024-06-18 | Use a dedicated type instead of a reference for the diagnostic context | Oli Scherer | -1/+1 | |
| This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle | ||||
| 2024-06-09 | rustdoc: Add support for --remap-path-prefix | Edward Shen | -5/+7 | |
| Adds --remap-path-prefix as an unstable option. This is implemented to mimic the behavior of rustc's --remap-path-prefix but with minor adjustments. This flag similarly takes in two paths, a prefix to replace and a replacement string. | ||||
| 2024-06-07 | run fmt | Guillaume Gomez | -18/+16 | |
| 2024-06-07 | Fix broken rustdoc unit tests | Noah Lev | -22/+37 | |
| 2024-06-07 | Parse full doctest source; extract helper for parsing code | Noah Lev | -90/+104 | |
| It doesn't really make sense to skip part of the source when we're parsing it, so parse the whole doctest. This simplifies things too. | ||||
| 2024-06-07 | Move logic for "making" doctests to submodule | Noah Lev | -0/+381 | |
| This code turns the raw code given by the user into something actually runnable, e.g. by adding a `main` function if it doesn't already exist. I also made a couple other items private that didn't need to be crate-public. | ||||
| 2024-06-07 | Move some arguments to fields and reorganize fields | Noah Lev | -12/+14 | |
| I moved some local arguments and options to either the local options struct or, if it made sense, the global options struct. | ||||
| 2024-06-07 | rustdoc: Remove `DoctestVisitor::get_line` | Noah Lev | -14/+13 | |
| This was used to get the line number of the first line from the current docstring, which was then used together with an offset within the docstring. It's simpler to just pass the offset to the visitor and have it do the math because it's clearer and this calculation only needs to be done in one place (the Rust doctest visitor). | ||||
| 2024-06-07 | Merge `RustDoctest` and `MdDoctest` into one type | Noah Lev | -23/+7 | |
| 2024-06-07 | rustdoc: Extract actual doctest running logic into function | Noah Lev | -3/+9 | |
| 2024-06-07 | Separate doctest collection from running | Noah Lev | -42/+201 | |
| 2024-06-07 | Move Markdown-specific doctest code into submodule | Noah Lev | -0/+46 | |
| 2024-06-07 | Start moving format-specific code into doctest submodule | Noah Lev | -0/+127 | |
| 2024-02-15 | add extra indent spaces for rust-playground link | yukang | -1/+43 | |
| 2023-04-25 | pass `unused_extern_crates` in `librustdoc::doctest::make_test` | ozkanonur | -0/+4 | |
| Signed-off-by: ozkanonur <work@onurozkan.dev> | ||||
| 2021-12-12 | Rename `TestOptions` to `GlobalTestOptions` | Noah Lev | -17/+17 | |
| It seems to apply to all doctests in the crate. | ||||
| 2021-11-26 | Remove `--display-doctest-warnings` | Joshua Nelson | -16/+1 | |
| This can be replicated in full with other existing features, there's no need to have a separate option for it. This also fixes a bug where `--test-args=--show-output` had no effect, and updates the documentation. | ||||
| 2021-09-14 | Rename --display-warnings to --display-doctest-warnings | Guillaume Gomez | -3/+4 | |
| 2021-02-11 | Fix injected errors when running doctests on a crate named after a keyword | Joshua Nelson | -4/+4 | |
| Unfortunately, this can't currently be tested. The problem is that we need the file to be compiled first to then be used as dependency, which cannot be done currently unfortunately in the rustdoc test suites. Example: ```rust // name this file "foo.rs" /// ``` /// let x = foo::foo(); /// ``` pub fn foo() {} ``` If you run `rustdoc --test foo.rs`, you'll get: ``` running 1 test test foo.rs - foo (line 1) ... FAILED failures: ---- foo.rs - foo (line 1) stdout ---- error[E0463]: can't find crate for `foo` --> foo.rs:0:1 | 2 | extern crate foo; | ^^^^^^^^^^^^^^^^^ can't find crate ``` If a test were possible, it would look something like ````rust #![crate_name = "mod"] #![crate_type = "lib"] //! ``` //! // NOTE: requires that the literal string 'mod' appears in the doctest for //! // the bug to appear //! assert_eq!(1, 1); //! ``` ```` | ||||
| 2020-12-29 | Remove unnecessary semicolon from Rustdoc-generated code | Aaron Hill | -2/+2 | |
| 2020-12-20 | add an attribute to inner doctest fn | Arpad Borsos | -3/+3 | |
| 2020-12-19 | Remap instrument-coverage line numbers in doctests | Arpad Borsos | -17/+52 | |
| This uses the `SourceMap::doctest_offset_line` method to re-map line numbers from doctests. Remapping columns is not yet done. Part of issue #79417. | ||||
| 2020-11-17 | Update doctest tests | Guillaume Gomez | -34/+34 | |
| 2020-08-27 | Rename rustdoc/test -> rustdoc/doctest | Aleksey Kladov | -0/+279 | |
| This modules contains the implementation of doctests, and not the tests of rustdoc itself. This name is confusing, so let's rename it to doctest for clarity. | ||||
