about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/compiletest/src/header/tests.rs6
-rw-r--r--src/tools/compiletest/src/util.rs2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs
index 31d991e0c2f..f7355433463 100644
--- a/src/tools/compiletest/src/header/tests.rs
+++ b/src/tools/compiletest/src/header/tests.rs
@@ -27,6 +27,12 @@ fn test_parse_normalization_string() {
     let first = parse_normalization_string(&mut s);
     assert_eq!(first, Some("something (32 bits)".to_owned()));
     assert_eq!(s, " -> \"something ($WORD bits).");
+
+    // Nothing to normalize (No quotes, 16-bit)
+    let mut s = "normalize-stderr-16bit: something (16 bits) -> something ($WORD bits).";
+    let first = parse_normalization_string(&mut s);
+    assert_eq!(first, None);
+    assert_eq!(s, r#"normalize-stderr-16bit: something (16 bits) -> something ($WORD bits)."#);
 }
 
 fn config() -> Config {
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
index e1c3042edb8..ca36a15ffc7 100644
--- a/src/tools/compiletest/src/util.rs
+++ b/src/tools/compiletest/src/util.rs
@@ -115,6 +115,8 @@ pub fn matches_env(triple: &str, name: &str) -> bool {
 pub fn get_pointer_width(triple: &str) -> &'static str {
     if (triple.contains("64") && !triple.ends_with("gnux32")) || triple.starts_with("s390x") {
         "64bit"
+    } else if triple.starts_with("avr") {
+        "16bit"
     } else {
         "32bit"
     }