mirror of
https://gitee.com/openharmony/third_party_rust_codespan
synced 2024-11-23 15:30:26 +00:00
commit
06fc2cc5ef
@ -0,0 +1,21 @@
|
||||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0001]: a message
|
||||
|
||||
warning[W001]: a message
|
||||
|
||||
note[N0815]: a message
|
||||
|
||||
help[H4711]: a message
|
||||
|
||||
error: where did my errorcode go?
|
||||
|
||||
warning: where did my errorcode go?
|
||||
|
||||
note: where did my errorcode go?
|
||||
|
||||
help: where did my errorcode go?
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
---
|
||||
source: codespan-reporting/tests/term.rs
|
||||
expression: TEST_DATA.emit_no_color(&config)
|
||||
---
|
||||
error[E0001]: a message
|
||||
warning[W001]: a message
|
||||
note[N0815]: a message
|
||||
help[H4711]: a message
|
||||
error: where did my errorcode go?
|
||||
warning: where did my errorcode go?
|
||||
note: where did my errorcode go?
|
||||
help: where did my errorcode go?
|
||||
|
@ -325,6 +325,32 @@ mod message_and_notes {
|
||||
test_emit!(short_no_color);
|
||||
}
|
||||
|
||||
mod message_errorcode {
|
||||
use super::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref TEST_DATA: TestData<'static, SimpleFiles<&'static str, &'static str>> = {
|
||||
let files = SimpleFiles::new();
|
||||
|
||||
let diagnostics = vec![
|
||||
Diagnostic::error().with_message("a message").with_code("E0001"),
|
||||
Diagnostic::warning().with_message("a message").with_code("W001"),
|
||||
Diagnostic::note().with_message("a message").with_code("N0815"),
|
||||
Diagnostic::help().with_message("a message").with_code("H4711"),
|
||||
Diagnostic::error().with_message("where did my errorcode go?").with_code(""),
|
||||
Diagnostic::warning().with_message("where did my errorcode go?").with_code(""),
|
||||
Diagnostic::note().with_message("where did my errorcode go?").with_code(""),
|
||||
Diagnostic::help().with_message("where did my errorcode go?").with_code(""),
|
||||
];
|
||||
|
||||
TestData { files, diagnostics }
|
||||
};
|
||||
}
|
||||
|
||||
test_emit!(rich_no_color);
|
||||
test_emit!(short_no_color);
|
||||
}
|
||||
|
||||
mod empty_ranges {
|
||||
use super::*;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user