kyz / libmspack

A library for some loosely related Microsoft compression formats, CAB, CHM, HLP, LIT, KWAJ and SZDD.
https://www.cabextract.org.uk/libmspack/
169 stars 45 forks source link

libmspack tests failing at v0.6alpha #12

Closed maitreyee43 closed 7 years ago

maitreyee43 commented 7 years ago

Hi, I am using libmspack for one of my projects, and I have realized some of the tests are failing.

  1. Are these tests updated for v0.6alpha? In cab_test, the test is expecting "test_files/cabd/partial_str_nofname.cab" to error out with MSPACK_ERR_DATAFORMAT, but it is throwing MSPACK_ERR_READ
  2. Is there any script to run cabd_c10 after we download the c10-archiver-r1.iso, or do we need to manually exctract all of it and out in separate folders manually as explained in the description?.
  3. For msdecompile_md5, could not find hhctrl.ocx and itss.dll in Microsoft HTML Help Workshop.
kyz commented 7 years ago
  1. Thanks for finding this. Yes, because of a recent change, short strings (where read returns less data than expected) are passed on as read errors, rather than turned into data format errors. I'll update the test.
  2. You need to extract the files yourself. However, you can also organize the files however you like, you don't have to put them in unpacked/00, unpacked/01, ... as I did. I suspect (bunzip2 < cab_tar.bz2 | tar xf -) && find cab -type f -exec test/cabd_md5 {} + would work just as well.
  3. hhctrl.ocx and itss.dll (and hh.exe and itircdl.dll) are extracted from hhupd.exe, which is extracted from htmlhelp.exe. I just checked today and it's still available. However, I've re-jigged the script, as the wine options need to be a little different to ensure the right itss.dll gets loaded.
kyz commented 7 years ago

Fixed in deb65056f436a4ce06946c4dde270f533e3cab4d