This commit is contained in:
Jesse Portnoy
2023-07-18 04:37:42 +01:00
parent 01852470c7
commit 78b6c61665
2 changed files with 23 additions and 25 deletions
-2
View File
@@ -4,10 +4,8 @@ import (
"bytes" "bytes"
"io/ioutil" "io/ioutil"
"testing" "testing"
) )
func getDefs(t *testing.T, filename string, data []byte, highlight_lexer string) *Def { func getDefs(t *testing.T, filename string, data []byte, highlight_lexer string) *Def {
var def *Def var def *Def
syn_dir := "./syntax_files" syn_dir := "./syntax_files"
+3 -3
View File
@@ -1,11 +1,11 @@
package highlight package highlight
import ( import (
"io/ioutil"
"testing"
"fmt" "fmt"
"io/ioutil"
"path/filepath" "path/filepath"
"strings" "strings"
"testing"
) )
func TestInputs(t *testing.T) { func TestInputs(t *testing.T) {
@@ -15,7 +15,7 @@ func TestInputs(t *testing.T){
if err != nil { if err != nil {
t.Errorf("Couldn't open '%s', error: %v\n", test_inputs_dir, err) t.Errorf("Couldn't open '%s', error: %v\n", test_inputs_dir, err)
} }
for _, filename := range(files){ for _, filename := range files {
ext := strings.Split(filename, ".") ext := strings.Split(filename, ".")
data, _ := ioutil.ReadFile(filename) data, _ := ioutil.ReadFile(filename)
fmt.Println("Testing def detection for " + filename) fmt.Println("Testing def detection for " + filename)