Skip to content

Commit

Permalink
Update unit tests to match more limited hint about escaping.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwanders committed Jan 16, 2022
1 parent 1531d26 commit af87248
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/conditional-compilation/cfg-arg-invalid-2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// compile-flags: --cfg a{b}
// error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
// error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`)
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
error: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`)

2 changes: 1 addition & 1 deletion src/test/ui/conditional-compilation/cfg-arg-invalid-4.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// compile-flags: --cfg a(b)
// error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
// error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`)
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
error: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`)

2 changes: 1 addition & 1 deletion src/test/ui/conditional-compilation/cfg-arg-invalid-6.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// compile-flags: --cfg a{
// error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
// error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`)
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
error: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`)

2 changes: 1 addition & 1 deletion src/test/ui/conditional-compilation/cfg-arg-invalid-8.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// compile-flags: --cfg )
// error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
// error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`)
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: invalid `--cfg` argument: `)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
error: invalid `--cfg` argument: `)` (expected `key` or `key="value"`)

1 change: 1 addition & 0 deletions src/test/ui/conditional-compilation/cfg-arg-invalid-9.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Test for missing quotes around value, issue #66450.
// compile-flags: --cfg key=value
// error-pattern: invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/conditional-compilation/cfg-empty-codemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// compile-flags: --cfg ""

// error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
// error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`)

pub fn main() {
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: invalid `--cfg` argument: `""` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
error: invalid `--cfg` argument: `""` (expected `key` or `key="value"`)

0 comments on commit af87248

Please sign in to comment.