-
Notifications
You must be signed in to change notification settings - Fork 13.5k
compiletest: Deny usage of special FileCheck suffixes as revision names #134925
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -553,6 +553,21 @@ fn test_duplicate_revisions() { | |
parse_rs(&config, "//@ revisions: rpass1 rpass1"); | ||
} | ||
|
||
#[test] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed in the latest commit. I had to select a specific revision name for this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the long run compiletest shouldn't be using randomly placed panics as an error handling strategy (really, the lack thereof), but in the short run this is reasonable. I think it's a reasonable compromise for the time being. |
||
fn test_forbidden_revisions() { | ||
let config: Config = cfg().build(); | ||
DavisRayM marked this conversation as resolved.
Show resolved
Hide resolved
|
||
let revisions = ["CHECK", "COM", "NEXT", "SAME", "EMPTY", "NOT", "COUNT", "DAG", "LABEL"]; | ||
for rev in revisions { | ||
let res = std::panic::catch_unwind(|| { | ||
parse_rs(&config, format!("//@ revisions: {rev}").as_str()); | ||
}); | ||
assert!(res.is_err()); | ||
if let Some(msg) = res.unwrap_err().downcast_ref::<String>() { | ||
assert!(msg.contains(format!("invalid revision: `{rev}` in line ` {rev}`").as_str())) | ||
} | ||
} | ||
} | ||
|
||
#[test] | ||
fn ignore_arch() { | ||
let archs = [ | ||
|
Uh oh!
There was an error while loading. Please reload this page.