aboutsummaryrefslogtreecommitdiff
path: root/pkg-config/tests
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-10 20:51:50 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-10 20:51:50 -0800
commit5875df6c958743cf86c75b2cb5fc2efe5ca0de43 (patch)
tree5c2275396ba921da440dc54dd76c0e5be1d3c60e /pkg-config/tests
parentdf88d39cd9c7b254057ee80dad5367313f2bb87f (diff)
downloadnitrocli-5875df6c958743cf86c75b2cb5fc2efe5ca0de43.tar.gz
nitrocli-5875df6c958743cf86c75b2cb5fc2efe5ca0de43.tar.bz2
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
Diffstat (limited to 'pkg-config/tests')
-rw-r--r--pkg-config/tests/escape.pc5
-rw-r--r--pkg-config/tests/framework.pc2
-rw-r--r--pkg-config/tests/test.rs19
3 files changed, 25 insertions, 1 deletions
diff --git a/pkg-config/tests/escape.pc b/pkg-config/tests/escape.pc
new file mode 100644
index 0000000..701c4bf
--- /dev/null
+++ b/pkg-config/tests/escape.pc
@@ -0,0 +1,5 @@
+Name: Escape
+Version: 4.2.0
+Description: Escape utility library
+Libs: -Llink\ path\ with\ spaces
+Cflags: -Iinclude\ path\ with\ spaces -DA=\"escaped\ string\'\ literal\" -DB=ESCAPED\ IDENTIFIER -DFOX=🦊
diff --git a/pkg-config/tests/framework.pc b/pkg-config/tests/framework.pc
index 57c0447..fec17f4 100644
--- a/pkg-config/tests/framework.pc
+++ b/pkg-config/tests/framework.pc
@@ -11,6 +11,6 @@ Name: Valgrind
Description: A dynamic binary instrumentation framework
Version: 3.10.0.SVN
Requires:
-Libs: -F${libdir} -framework foo
+Libs: -F${libdir} -framework foo -Wl,-framework,bar -Wl,-framework -Wl,baz -Wl,-framework,foobar,-framework,foobaz
Cflags: -I${includedir}
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
@@ -75,11 +75,30 @@ fn output_ok() {
}
#[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")));
}