mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
litonlylzma: add allowTestsToExecOtherPrograms
This commit is contained in:
1 parent
4f45ddcb0c
commit
42d3b4d692
2 files changed
+13
-1
No files matched your search
@@ -26,7 +26,8 @@
|
|||||||
// back-references.
|
// back-references.
|
||||||
//
|
//
|
||||||
// The main benefit, compared to full LZMA/Xz, is that this implementation is
|
// The main benefit, compared to full LZMA/Xz, is that this implementation is
|
||||||
// much simpler and hence easier to study. It is around 800 lines of code.
|
// much simpler and hence easier to study. It is around 800 lines of code,
|
||||||
|
// about a third of which are comments.
|
||||||
//
|
//
|
||||||
// Example compression numbers on a small English text file (at
|
// Example compression numbers on a small English text file (at
|
||||||
// https://github.com/google/wuffs/blob/main/test/data/romeo.txt):
|
// https://github.com/google/wuffs/blob/main/test/data/romeo.txt):
|
||||||
@@ -55,6 +56,9 @@
|
|||||||
// linux-5.0.1.tar.xz file size above differs from what cdn.kernel.org served.
|
// linux-5.0.1.tar.xz file size above differs from what cdn.kernel.org served.
|
||||||
package litonlylzma
|
package litonlylzma
|
||||||
|
|
||||||
|
// When editing this file, consider setting "allowTestsToExecOtherPrograms =
|
||||||
|
// true" in the test code.
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"hash/crc32"
|
"hash/crc32"
|
||||||
|
|||||||
@@ -68,6 +68,14 @@ func TestRoundTripPiTxt(tt *testing.T) { testRoundTrip(tt, "pi.txt")
|
|||||||
func TestRoundTripRomeoTxt(tt *testing.T) { testRoundTrip(tt, "romeo.txt") }
|
func TestRoundTripRomeoTxt(tt *testing.T) { testRoundTrip(tt, "romeo.txt") }
|
||||||
|
|
||||||
func TestUsrBinFoocatCompat(tt *testing.T) {
|
func TestUsrBinFoocatCompat(tt *testing.T) {
|
||||||
|
// Set "allowTestsToExecOtherPrograms = true" for more test coverage,
|
||||||
|
// checking compatibility with third-party decompression tools that are
|
||||||
|
// often available (at a well known location) on Linux.
|
||||||
|
const allowTestsToExecOtherPrograms = false
|
||||||
|
if !allowTestsToExecOtherPrograms {
|
||||||
|
tt.Skip("not configured to exec third-party programs")
|
||||||
|
}
|
||||||
|
|
||||||
testCases := [...]struct {
|
testCases := [...]struct {
|
||||||
fileFormat FileFormat
|
fileFormat FileFormat
|
||||||
command string
|
command string
|
||||||
|
|||||||
Reference in new issue
Block a user