From 5875df6c958743cf86c75b2cb5fc2efe5ca0de43 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 10 Dec 2018 20:51:50 -0800 Subject: Update pkg-config crate to 0.3.14 This change updates the pkg-config crate to version 0.3.14. Import subrepo pkg-config/:pkg-config at f867f8be1babca4d6d9cddc92a817519ae845193 --- pkg-config/tests/test.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'pkg-config/tests/test.rs') diff --git a/pkg-config/tests/test.rs b/pkg-config/tests/test.rs index ee8613c..fad0fcf 100644 --- a/pkg-config/tests/test.rs +++ b/pkg-config/tests/test.rs @@ -74,12 +74,31 @@ fn output_ok() { assert!(lib.link_paths.contains(&PathBuf::from("/usr/lib/valgrind"))); } +#[test] +fn escapes() { + let _g = LOCK.lock(); + reset(); + let lib = find("escape").unwrap(); + assert!(lib.include_paths.contains(&PathBuf::from("include path with spaces"))); + assert!(lib.link_paths.contains(&PathBuf::from("link path with spaces"))); + assert_eq!(lib.defines.get("A"), + Some(&Some("\"escaped string' literal\"".to_owned()))); + assert_eq!(lib.defines.get("B"), + Some(&Some("ESCAPED IDENTIFIER".to_owned()))); + assert_eq!(lib.defines.get("FOX"), + Some(&Some("🦊".to_owned()))); +} + #[test] fn framework() { let _g = LOCK.lock(); reset(); let lib = find("framework").unwrap(); assert!(lib.frameworks.contains(&"foo".to_string())); + assert!(lib.frameworks.contains(&"bar".to_string())); + assert!(lib.frameworks.contains(&"baz".to_string())); + assert!(lib.frameworks.contains(&"foobar".to_string())); + assert!(lib.frameworks.contains(&"foobaz".to_string())); assert!(lib.framework_paths.contains(&PathBuf::from("/usr/lib"))); } -- cgit v1.2.1