()
| 911 | |
| 912 | #[test] |
| 913 | fn test_archive_options_builder() { |
| 914 | let state = Merkle::of(b"test"); |
| 915 | let options = ArchiveOptions::new() |
| 916 | .format(ArchiveFormat::Tar) |
| 917 | .state(state) |
| 918 | .with_prefix("project-1.0/") |
| 919 | .include(&["src/*", "Cargo.toml"]) |
| 920 | .exclude(&["*.log", "target/"]) |
| 921 | .overwrite(true) |
| 922 | .compression_level(9); |
| 923 | |
| 924 | assert_eq!(options.format, ArchiveFormat::Tar); |
| 925 | assert_eq!(options.state, Some(state)); |
| 926 | assert_eq!(options.prefix, Some("project-1.0/".to_string())); |
| 927 | assert_eq!(options.include.len(), 2); |
| 928 | assert_eq!(options.exclude.len(), 2); |
| 929 | assert!(options.overwrite); |
| 930 | assert_eq!(options.compression_level, 9); |
| 931 | } |
| 932 | |
| 933 | #[test] |
| 934 | fn test_archive_options_shortcuts() { |
nothing calls this directly
no test coverage detected