Tweak proc_macro test to correctly test case.
authorLucas Kolstad <lkolstad@uw.edu>
Thu, 31 Aug 2017 17:55:19 +0000 (10:55 -0700)
committerLucas Kolstad <lkolstad@uw.edu>
Thu, 31 Aug 2017 17:55:19 +0000 (10:55 -0700)
Minor change causes the test to actually test the case instead of always
passing regardless of the fix that adds the host dependency directory to
the library search path.

tests/test.rs

index 310ba9768a4b388eae37dd6b2f63be5cae467202..f9d69e1f27505916e931adca20ce75ae4f7d6eea 100644 (file)
@@ -2816,10 +2816,10 @@ fn find_dependency_of_proc_macro_dependency_with_target() {
             proc-macro = true
 
             [dependencies]
-            dep_of_proc_macro_dep = "^0.1"
+            bar = "^0.1"
         "#)
         .file("proc_macro_dep/src/lib.rs", r#"
-            extern crate dep_of_proc_macro_dep;
+            extern crate bar;
             extern crate proc_macro;
             use proc_macro::TokenStream;
 
@@ -2828,7 +2828,11 @@ fn find_dependency_of_proc_macro_dependency_with_target() {
                 "".parse().unwrap()
             }
         "#);
-    Package::new("dep_of_proc_macro_dep", "0.1.0").publish();
+    Package::new("foo", "0.1.0").publish();
+    Package::new("bar", "0.1.0")
+        .dep("foo", "0.1")
+        .file("src/lib.rs", "extern crate foo;")
+        .publish();
     workspace.build();
     assert_that(workspace.cargo("test").arg("--all").arg("--target").arg(rustc_host()),
                 execs().with_status(0));