File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ async fn test_get_version() -> anyhow::Result<()> {
2626#[ test( tokio:: test) ]
2727async fn test_get_archive_and_extract ( ) -> anyhow:: Result < ( ) > {
2828 let url = theseus:: URL ;
29- let version_req = VersionReq :: STAR ;
29+ let version_req = VersionReq :: parse ( "=16.3.0" ) ? ;
3030 let ( archive_version, archive) = get_archive ( url, & version_req) . await ?;
3131
3232 assert ! ( version_req. matches( & archive_version) ) ;
Original file line number Diff line number Diff line change @@ -24,13 +24,14 @@ fn test_get_version() -> anyhow::Result<()> {
2424#[ allow( deprecated) ]
2525fn test_get_archive_and_extract ( ) -> anyhow:: Result < ( ) > {
2626 let url = theseus:: URL ;
27- let version_req = & VersionReq :: STAR ;
27+ let version_req = & VersionReq :: parse ( "=16.3.0" ) ? ;
2828 let ( archive_version, archive) = get_archive ( url, version_req) ?;
2929
3030 assert ! ( version_req. matches( & archive_version) ) ;
3131
3232 let out_dir = tempfile:: tempdir ( ) ?. path ( ) . to_path_buf ( ) ;
33- extract ( url, & archive, & out_dir) ?;
33+ let files = extract ( url, & archive, & out_dir) ?;
34+ assert ! ( files. len( ) > 0 ) ;
3435 remove_dir_all ( & out_dir) ?;
3536 Ok ( ( ) )
3637}
Original file line number Diff line number Diff line change @@ -35,13 +35,20 @@ async fn test_get_version() -> anyhow::Result<()> {
3535#[ cfg( feature = "zonky" ) ]
3636async fn test_get_archive_and_extract ( ) -> anyhow:: Result < ( ) > {
3737 let url = zonky:: URL ;
38- let version_req = VersionReq :: STAR ;
38+ let version_req = VersionReq :: parse ( "=16.3.0" ) ? ;
3939 let ( archive_version, archive) = get_archive ( url, & version_req) . await ?;
4040
4141 assert ! ( version_req. matches( & archive_version) ) ;
4242
4343 let out_dir = tempfile:: tempdir ( ) ?. path ( ) . to_path_buf ( ) ;
4444 let files = extract ( url, & archive, & out_dir) . await ?;
45+ #[ cfg( all( target_os = "linux" , target_arch = "x86_64" ) ) ]
46+ assert_eq ! ( 1_023 , files. len( ) ) ;
47+ #[ cfg( all( target_os = "macos" , target_arch = "aarch64" ) ) ]
48+ assert_eq ! ( 1_019 , files. len( ) ) ;
49+ #[ cfg( all( target_os = "macos" , target_arch = "x86_64" ) ) ]
50+ assert_eq ! ( 1_019 , files. len( ) ) ;
51+ #[ cfg( all( target_os = "windows" , target_arch = "x86_64" ) ) ]
4552 assert_eq ! ( 1_019 , files. len( ) ) ;
4653 remove_dir_all ( & out_dir) ?;
4754 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments