File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2929//! let url = theseus::URL;
3030//! let (archive_version, archive) = get_archive(url, &VersionReq::STAR).await?;
3131//! let out_dir = std::env::temp_dir();
32- //! extract(url, &archive, &out_dir).await
32+ //! let files = extract(url, &archive, &out_dir).await?;
33+ //! Ok(())
3334//! }
3435//! ```
3536//!
Original file line number Diff line number Diff line change @@ -33,7 +33,14 @@ async fn test_get_archive_and_extract() -> anyhow::Result<()> {
3333
3434 let out_dir = tempfile:: tempdir ( ) ?. path ( ) . to_path_buf ( ) ;
3535 let files = extract ( url, & archive, & out_dir) . await ?;
36+ #[ cfg( all( target_os = "linux" , target_arch = "x86_64" ) ) ]
37+ assert_eq ! ( 1_312 , files. len( ) ) ;
38+ #[ cfg( all( target_os = "macos" , target_arch = "aarch64" ) ) ]
3639 assert_eq ! ( 1_271 , files. len( ) ) ;
40+ #[ cfg( all( target_os = "macos" , target_arch = "x86_64" ) ) ]
41+ assert_eq ! ( 1_271 , files. len( ) ) ;
42+ #[ cfg( all( target_os = "windows" , target_arch = "x86_64" ) ) ]
43+ assert_eq ! ( 3_120 , files. len( ) ) ;
3744 remove_dir_all ( & out_dir) ?;
3845 Ok ( ( ) )
3946}
You can’t perform that action at this time.
0 commit comments