Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove raw #s that are unnecessary #1976

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nextest-runner/src/config/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ mod tests {
[profile.default]
archive.include = { path = "foo", relative-to = "target" }
"#},
r#"invalid type: map, expected a sequence"#
r"invalid type: map, expected a sequence"
; "missing list")]
#[test_case(
indoc!{r#"
Expand All @@ -362,7 +362,7 @@ mod tests {
{ path = "foo" }
]
"#},
r#"missing field `relative-to`"#
r"missing field `relative-to`"
; "missing relative-to")]
#[test_case(
indoc!{r#"
Expand All @@ -371,7 +371,7 @@ mod tests {
{ path = "bar", relative-to = "unknown" }
]
"#},
r#"enum ArchiveRelativeTo does not have variant constructor unknown"#
r"enum ArchiveRelativeTo does not have variant constructor unknown"
; "invalid relative-to")]
#[test_case(
indoc!{r#"
Expand Down
2 changes: 1 addition & 1 deletion nextest-runner/src/config/scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ mod tests {
[script.'#foo']
command = "my-command"
"#},
r#"invalid configuration script name: invalid identifier `#foo`"#
r"invalid configuration script name: invalid identifier `#foo`"

; "invalid script name"
)]
Expand Down
4 changes: 2 additions & 2 deletions nextest-runner/src/list/binary_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,14 @@ mod tests {
fake-package::bin/fake-binary
fake-macro::proc-macro/fake-macro
"};
static EXPECTED_HUMAN_VERBOSE: &str = indoc! {r#"
static EXPECTED_HUMAN_VERBOSE: &str = indoc! {r"
fake-package::bin/fake-binary:
bin: /fake/binary
build platform: target
fake-macro::proc-macro/fake-macro:
bin: /fake/macro
build platform: host
"#};
"};
static EXPECTED_JSON_PRETTY: &str = indoc! {r#"
{
"rust-build-meta": {
Expand Down
24 changes: 12 additions & 12 deletions nextest-runner/src/reporter/error_description.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,17 @@ more text at the end, followed by some newlines"#,
),
// Multiple panics: only the last one should be extracted.
(
r#"
r"
thread 'main' panicked at src/lib.rs:1:
foo
thread 'main' panicked at src/lib.rs:2:
bar
"#,
r#"thread 'main' panicked at src/lib.rs:2:
bar"#,
",
r"thread 'main' panicked at src/lib.rs:2:
bar",
), // With RUST_BACKTRACE=1
(
r#"
r"
some initial text
line 2
line 3
Expand All @@ -473,8 +473,8 @@ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose bac
more text at the end, followed by some newlines


"#,
r#"thread 'reporter::helpers::tests::test_heuristic_stack_trace' panicked at nextest-runner/src/reporter/helpers.rs:237:9:
",
r"thread 'reporter::helpers::tests::test_heuristic_stack_trace' panicked at nextest-runner/src/reporter/helpers.rs:237:9:
test
stack backtrace:
0: rust_begin_unwind
Expand All @@ -490,11 +490,11 @@ stack backtrace:
5: core::ops::function::FnOnce::call_once
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
more text at the end, followed by some newlines"#,
more text at the end, followed by some newlines",
),
// RUST_BACKTRACE=full
(
r#"
r"
some initial text
thread 'reporter::helpers::tests::test_heuristic_stack_trace' panicked at nextest-runner/src/reporter/helpers.rs:237:9:
test
Expand All @@ -514,8 +514,8 @@ stack backtrace:
some more text at the end, followed by some newlines


"#,
r#"thread 'reporter::helpers::tests::test_heuristic_stack_trace' panicked at nextest-runner/src/reporter/helpers.rs:237:9:
",
r"thread 'reporter::helpers::tests::test_heuristic_stack_trace' panicked at nextest-runner/src/reporter/helpers.rs:237:9:
test
stack backtrace:
0: 0x61e6da135fe5 - std::backtrace_rs::backtrace::libunwind::trace::h23054e327d0d4b55
Expand All @@ -530,7 +530,7 @@ stack backtrace:
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/fmt/rt.rs:165:63
5: 0x61e6da16433b - core::fmt::write::hc6043626647b98ea
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/fmt/mod.rs:1168:21
some more text at the end, followed by some newlines"#,
some more text at the end, followed by some newlines",
),
];

Expand Down
4 changes: 2 additions & 2 deletions nextest-runner/src/reporter/structured/libtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ mod test {
"this is stdout\n",
"this i stderr\nok?\n",
"thread 'index::test::download_url_crates_io'",
r#" panicked at src/index.rs:206:9:
r" panicked at src/index.rs:206:9:
oh no
stack backtrace:
0: rust_begin_unwind
Expand All @@ -701,7 +701,7 @@ stack backtrace:
5: core::ops::function::FnOnce::call_once
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
"#,
",
"test index::test::download_url_crates_io ... FAILED\n",
"\n\nfailures:\n\nfailures:\n index::test::download_url_crates_io\n\ntest result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 13 filtered out; finished in 0.01s\n",
];
Expand Down
Loading