mirror of
https://github.com/walles/moar.git
synced 2024-08-16 23:40:35 +03:00
Dodge corner case issue
If call "highlight" on an empty file the output will have a line. We don't really care about that. This change renames empty.txt (which highlight wants to highlight) into just "empty", which highlight will not try to highligt, so no line is added and the test passes.
This commit is contained in:
parent
0f0c8a1111
commit
ebba21a409
@ -3,8 +3,10 @@ package m
|
||||
import (
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"os/exec"
|
||||
"path"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@ -12,7 +14,6 @@ import (
|
||||
)
|
||||
|
||||
func _TestGetLineCount(t *testing.T, reader *Reader) {
|
||||
/* FIXME: Re-enable this test and fix the problems found, this test finds problems
|
||||
if strings.Contains(*reader.name, "compressed") {
|
||||
// We are no good at counting lines of compressed files, never mind
|
||||
return
|
||||
@ -33,7 +34,6 @@ func _TestGetLineCount(t *testing.T, reader *Reader) {
|
||||
t.Errorf("Got %d lines but expected %d: <%s>",
|
||||
reader.GetLineCount(), fileLineCount, *reader.name)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
func _TestGetLines(t *testing.T, reader *Reader) {
|
||||
|
Loading…
Reference in New Issue
Block a user