File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use std::path::PathBuf;
88use std:: thread;
99
1010use crate :: prelude:: * ;
11- use crate :: utils:: cargo_process;
11+ use crate :: utils:: { cargo_process, pkg } ;
1212use cargo_test_support:: compare:: assert_e2e;
1313use cargo_test_support:: cross_compile;
1414use cargo_test_support:: git;
@@ -21,16 +21,6 @@ use crate::utils::cross_compile::disabled as cross_compile_disabled;
2121use cargo_test_support:: install:: { assert_has_installed_exe, assert_has_not_installed_exe, exe} ;
2222use cargo_test_support:: paths;
2323
24- fn pkg ( name : & str , vers : & str ) {
25- Package :: new ( name, vers)
26- . file ( "src/lib.rs" , "" )
27- . file (
28- "src/main.rs" ,
29- & format ! ( "extern crate {}; fn main() {{}}" , name) ,
30- )
31- . publish ( ) ;
32- }
33-
3424#[ cargo_test]
3525fn simple ( ) {
3626 pkg ( "foo" , "0.0.1" ) ;
Original file line number Diff line number Diff line change 11use std:: path:: PathBuf ;
22
3+ use cargo_test_support:: registry:: Package ;
34use cargo_test_support:: { ArgLineCommandExt , Execs , execs, process} ;
45
56pub mod cross_compile;
@@ -19,3 +20,13 @@ pub fn cargo_process(arg_line: &str) -> Execs {
1920pub fn cargo_exe ( ) -> PathBuf {
2021 snapbox:: cmd:: cargo_bin!( "cargo" ) . to_path_buf ( )
2122}
23+
24+ pub fn pkg ( name : & str , vers : & str ) {
25+ Package :: new ( name, vers)
26+ . file ( "src/lib.rs" , "" )
27+ . file (
28+ "src/main.rs" ,
29+ & format ! ( "extern crate {}; fn main() {{}}" , name) ,
30+ )
31+ . publish ( ) ;
32+ }
You can’t perform that action at this time.
0 commit comments