1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
Description: Disable tests that rely on test tarballs
The test tarballs are not included in the crate on crates.io and hence are not
included in the Debian package. I figure that it is better to run some of the
tests than none of the tests.
Author: Peter Michael Green <plugwash@debian.org>
--- a/tests/all.rs
+++ b/tests/all.rs
@@ -23,17 +23,17 @@
};
}
-macro_rules! tar {
+/*macro_rules! tar {
($e:expr) => {
&include_bytes!(concat!("archives/", $e))[..]
};
-}
+}*/
mod header;
/// test that we can concatenate the simple.tar archive and extract the same entries twice when we
/// use the ignore_zeros option.
-#[test]
+/*#[test]
fn simple_concat() {
let bytes = tar!("simple.tar");
let mut archive_bytes = Vec::new();
@@ -76,9 +76,9 @@
names
}
-}
+}*/
-#[test]
+/*#[test]
fn header_impls() {
let mut ar = Archive::new(Cursor::new(tar!("simple.tar")));
let hn = Header::new_old();
@@ -91,9 +91,9 @@
let h2b = h2.as_bytes();
assert!(h1b[..] == h2b[..] && h2b[..] != hnb[..])
}
-}
+}*/
-#[test]
+/*#[test]
fn header_impls_missing_last_header() {
let mut ar = Archive::new(Cursor::new(tar!("simple_missing_last_header.tar")));
let hn = Header::new_old();
@@ -106,9 +106,9 @@
let h2b = h2.as_bytes();
assert!(h1b[..] == h2b[..] && h2b[..] != hnb[..])
}
-}
+}*/
-#[test]
+/*#[test]
fn reading_files() {
let rdr = Cursor::new(tar!("reading_files.tar"));
let mut ar = Archive::new(rdr);
@@ -127,7 +127,7 @@
assert_eq!(s, "b\nb\nb\nb\nb\nb\nb\nb\nb\nb\nb\n");
assert!(entries.next().is_none());
-}
+}*/
#[test]
fn writing_files() {
@@ -221,7 +221,7 @@
assert!(entries.next().is_none());
}
-#[test]
+/*#[test]
fn reading_entries() {
let rdr = Cursor::new(tar!("reading_files.tar"));
let mut ar = Archive::new(rdr);
@@ -234,6 +234,7 @@
let mut ar = Archive::new(rdr);
reading_entries_common(t!(ar.entries_with_seek()));
}
+*/
struct LoggingReader<R> {
inner: R,
@@ -264,6 +265,7 @@
}
}
+/*
#[test]
fn skipping_entries_with_seek() {
let mut reader = LoggingReader::new(Cursor::new(tar!("reading_files.tar")));
@@ -281,6 +283,7 @@
assert!(files == files_seekable);
assert!(seekable_reader.read_bytes < reader.read_bytes);
}
+*/
fn check_dirtree(td: &TempDir) {
let dir_a = td.path().join("a");
@@ -291,6 +294,7 @@
assert!(fs::metadata(&file_c).map(|m| m.is_file()).unwrap_or(false));
}
+/*
#[test]
fn extracting_directories() {
let td = t!(TempBuilder::new().prefix("tar-rs").tempdir());
@@ -1077,8 +1081,9 @@
assert!(s[0x2fa0 + 6..0x4000].chars().all(|x| x == '\u{0}'));
assert!(entries.next().is_none());
-}
+}*/
+/*
#[test]
fn extract_sparse() {
let rdr = Cursor::new(tar!("sparse.tar"));
@@ -1118,9 +1123,9 @@
assert!(s[0x1000 + 6..0x2fa0].chars().all(|x| x == '\u{0}'));
assert_eq!(&s[0x2fa0..0x2fa0 + 6], "world\n");
assert!(s[0x2fa0 + 6..0x4000].chars().all(|x| x == '\u{0}'));
-}
+}*/
-#[test]
+/*#[test]
fn sparse_with_trailing() {
let rdr = Cursor::new(tar!("sparse-1.tar"));
let mut ar = Archive::new(rdr);
@@ -1132,7 +1137,7 @@
assert_eq!(&s[..0xc], "0MB through\n");
assert!(s[0xc..0x100_000].chars().all(|x| x == '\u{0}'));
assert_eq!(&s[0x100_000..], "1MB through\n");
-}
+}*/
#[test]
fn path_separators() {
@@ -1302,15 +1307,15 @@
ar.finish().unwrap();
}
-#[test]
+/*#[test]
fn long_path() {
let td = t!(TempBuilder::new().prefix("tar-rs").tempdir());
let rdr = Cursor::new(tar!("7z_long_path.tar"));
let mut ar = Archive::new(rdr);
assert!(ar.unpack(td.path()).is_ok());
-}
+}*/
-#[test]
+/*#[test]
fn unpack_path_larger_than_windows_max_path() {
let dir_name = "iamaprettylongnameandtobepreciseiam91characterslongwhichsomethinkisreallylongandothersdonot";
// 183 character directory name
@@ -1321,7 +1326,7 @@
let mut ar = Archive::new(rdr);
// should unpack path greater than windows MAX_PATH length of 260 characters
assert!(ar.unpack(td.path()).is_ok());
-}
+}*/
#[test]
fn append_long_multibyte() {
@@ -1489,7 +1494,7 @@
}
}
-#[test]
+/*#[test]
#[cfg(unix)]
fn pax_and_gnu_uid_gid() {
let tarlist = [tar!("biguid_gnu.tar"), tar!("biguid_pax.tar")];
@@ -1514,4 +1519,4 @@
assert!(ar.unpack(td.path()).is_err());
}
}
-}
+}*/
|