Skip to content

Commit 86af317

Browse files
committed
Add some test comments
1 parent 0822593 commit 86af317

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

os/test/src/ZipOpTests.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,14 @@ object ZipOpTests extends TestSuite {
309309
if (!scala.util.Properties.isWin) {
310310
val (source, unzipped, link) = prepare(wd, preserveLinks = false)
311311

312+
// test all files are there
312313
assert(walkRel(source).toSet == walkRel(unzipped).toSet)
314+
// test all permissions are preserved
313315
assert(os.walk.stream(source)
314316
.filter(!os.isLink(_))
315317
.forall(p => os.perms(p) == os.perms(unzipped / p.relativeTo(source))))
316318

319+
// test symlinks are zipped as the referenced files
317320
val unzippedLink = unzipped / link
318321
assert(os.isFile(unzippedLink))
319322
assert(os.read(os.readLink.absolute(source / link)) == os.read(unzippedLink))
@@ -329,6 +332,7 @@ object ZipOpTests extends TestSuite {
329332
.filter(!os.isLink(_))
330333
.forall(p => os.perms(p) == os.perms(unzipped / p.relativeTo(source))))
331334

335+
// test symlinks are zipped as symlinks
332336
val unzippedLink = unzipped / link
333337
assert(os.isLink(unzippedLink))
334338
assert(os.readLink(source / link) == os.readLink(unzippedLink))
@@ -389,9 +393,9 @@ object ZipOpTests extends TestSuite {
389393
}
390394
}
391395

392-
test("") - prep { wd =>
396+
test("existingZip") - prep { wd =>
393397
if (!scala.util.Properties.isWin) {
394-
val (source, unzipped, link) = prepare(wd, preserveLinks = true)
398+
val (source, unzipped, link) = prepare(wd)
395399

396400
val newSource = os.pwd / "source"
397401
os.makeDir(newSource)

0 commit comments

Comments
 (0)