File tree Expand file tree Collapse file tree 5 files changed +67
-0
lines changed
tests/testsuite/cargo_add Expand file tree Collapse file tree 5 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ mod path_base_unstable;
126126mod path_dev;
127127mod path_inferred_name;
128128mod path_inferred_name_conflicts_full_feature;
129+ mod prefixed_v_in_version;
129130mod preserve_dep_std_table;
130131mod preserve_features_sorted;
131132mod preserve_features_table;
Original file line number Diff line number Diff line change 1+ ../add-basic.in
Original file line number Diff line number Diff line change 1+ use cargo_test_support:: compare:: assert_ui;
2+ use cargo_test_support:: current_dir;
3+ use cargo_test_support:: file;
4+ use cargo_test_support:: prelude:: * ;
5+ use cargo_test_support:: str;
6+ use cargo_test_support:: Project ;
7+
8+ #[ cargo_test]
9+ fn case ( ) {
10+ cargo_test_support:: registry:: init ( ) ;
11+
12+ let project = Project :: from_template ( current_dir ! ( ) . join ( "in" ) ) ;
13+ let project_root = project. root ( ) ;
14+ let cwd = & project_root;
15+
16+ snapbox:: cmd:: Command :: cargo_ui ( )
17+ . arg ( "add" )
18+ . arg_line ( "foo@v0.0.1" )
19+ . current_dir ( cwd)
20+ . assert ( )
21+ . code ( 101 )
22+ . stdout_eq ( str![ "" ] )
23+ . stderr_eq ( file ! [ "stderr.term.svg" ] ) ;
24+
25+ assert_ui ( ) . subset_matches ( current_dir ! ( ) . join ( "out" ) , & project_root) ;
26+ }
Original file line number Diff line number Diff line change 1+ [workspace ]
2+
3+ [package ]
4+ name = " cargo-list-test-fixture"
5+ version = " 0.0.0"
6+ edition = " 2015"
You can’t perform that action at this time.
0 commit comments