1
1
mirror of https://github.com/walles/moar.git synced 2024-09-21 09:01:30 +03:00

Skip xz compressed file in one more place

This commit is contained in:
Johan Walles 2021-04-15 14:57:56 +02:00
parent 9b86ae7b19
commit e88aa3f43e

View File

@ -127,6 +127,14 @@ func getTestFiles() []string {
func TestGetLines(t *testing.T) {
for _, file := range getTestFiles() {
if strings.HasSuffix(file, ".xz") {
_, err := exec.LookPath("xz")
if err != nil {
t.Log("Not testing xz compressed file, xz not found in $PATH: ", file)
continue
}
}
reader, err := NewReaderFromFilename(file)
if err != nil {
t.Errorf("Error opening file <%s>: %s", file, err.Error())