]> git.proxmox.com Git - cargo.git/commitdiff
Add a test for this too
authorSteve Klabnik <steve@steveklabnik.com>
Mon, 1 Feb 2016 22:02:23 +0000 (17:02 -0500)
committerSteve Klabnik <steve@steveklabnik.com>
Mon, 1 Feb 2016 22:02:23 +0000 (17:02 -0500)
tests/test_cargo_registry.rs

index b9c9865198462b5186137512c0425e0c942d3654..793235edeced091932fa371af2c6c902125a5a2a 100644 (file)
@@ -956,3 +956,22 @@ test!(update_same_prefix_oh_my_how_was_this_a_bug {
     assert_that(p.cargo("update").arg("-pfoobar").arg("--precise=0.2.0"),
                 execs().with_status(0));
 });
+
+test!(use_semver {                                        
+    let p = project("foo")                                
+        .file("Cargo.toml", r#"                           
+            [project]                                     
+            name = "bar"                                  
+            version = "0.5.0"                             
+            authors = []                                  
+
+            [dependencies]                                
+            foo = "1.2.3-alpha.0"                         
+        "#)                                               
+        .file("src/main.rs", "fn main() {}");             
+    p.build();                                            
+
+    Package::new("foo", "1.2.3-alpha.0").publish();       
+
+    assert_that(p.cargo("build"), execs().with_status(0));
+});