MCPcopy Create free account
hub / github.com/archlinux/alpm / test_empty_optional_value

Function test_empty_optional_value

alpm-srcinfo/src/pkgbuild_bridge/mod.rs:236–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234 /// Ensure that an empty single value will return `None` when passed into
235 /// [`parse_optional_value`].
236 #[test]
237 pub fn test_empty_optional_value() -> TestResult {
238 let keyword = Keyword::simple("test");
239 let value = Value::Single("".to_string());
240
241 let value = parse_optional_value(&keyword, &value, rest)?;
242
243 assert!(value.is_none(), "Empty string values should return `None`.");
244
245 Ok(())
246 }
247}

Callers

nothing calls this directly

Calls 1

parse_optional_valueFunction · 0.85

Tested by

no test coverage detected