   expectEqual(result?.result.isEmpty, true)
 }
 
-CStringTests.test("String.decodingCString.with.Array.input") {
+CStringTests.test("String.decodeCString.with.inout.conversion") {
+  var c = Unicode.UTF8.CodeUnit.zero
+  var result = String.decodeCString(
+    &c, as: Unicode.UTF8.self, repairingInvalidCodeUnits: true
+  )
+  expectNotNil(result)
+  expectEqual(result?.result.isEmpty, true)
+  expectEqual(result?.repairsMade, false)
+  c = 100
+  expectCrashLater(
+    withMessage: "input of decodeCString(_:as:repairingInvalidCodeUnits:) must be null-terminated"
+  )
+  result = String.decodeCString(&c, as: Unicode.UTF8.self)
+  expectUnreachable()
+}
+
+CStringTests.test("String.init.decodingCString.with.Array.input") {
   do {
     let (u8p, dealloc) = getASCIIUTF8()
     defer { dealloc() }

  expectTrue(str.isEmpty)
}

CStringTests.test("String.validatingUTF8.with.Array.input") {
  do {
    let (u8p, dealloc) = getASCIIUTF8()

  expectTrue(str.isEmpty)
}

CStringTests.test("String.init.decodingCString.with.inout.conversion") {
  var c = Unicode.UTF8.CodeUnit.zero
  var str = String(decodingCString: &c, as: Unicode.UTF8.self)
  expectEqual(str.isEmpty, true)
  c = 100
  expectCrashLater(
    withMessage: "input of String.init(decodingCString:as:) must be null-terminated"
  )
  str = String(decodingCString: &c, as: Unicode.UTF8.self)
  expectUnreachable()
}

runAllTests()

