www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20398] New: Wrong number of totalEntries in std.zip

https://issues.dlang.org/show_bug.cgi?id=20398

          Issue ID: 20398
           Summary: Wrong number of totalEntries in std.zip
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla d-ecke.de

import std.string : representation;
import std.zip;

void main()
{
    ArchiveMember file1 = new ArchiveMember();
    file1.name = "test1.txt";
    file1.expandedData("Test data.\n".dup.representation);

    ZipArchive zip = new ZipArchive();

    zip.addMember(file1);

    assert(zip.totalEntries == 1);
}

--
Nov 16 2019