mirror of
https://github.com/kataras/iris.git
synced 2025-03-14 08:26:26 +01:00
minor for travis
Former-commit-id: 2a62e2817e8fc98a77359344a88505151b61654e
This commit is contained in:
parent
5da8ff92f3
commit
78ab341862
|
@ -55,6 +55,7 @@ func (r resource) loadFromBase(dir string) string {
|
|||
|
||||
if runtime.GOOS != "windows" {
|
||||
result = strings.Replace(result, "\n", "\r\n", -1)
|
||||
result = strings.Replace(result, "\r\r", "", -1)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ func (r resource) loadFromBase(dir string) string {
|
|||
result := string(b)
|
||||
if runtime.GOOS != "windows" {
|
||||
result = strings.Replace(result, "\n", "\r\n", -1)
|
||||
result = strings.Replace(result, "\r\r", "", -1)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/kataras/iris/v12"
|
||||
"github.com/kataras/iris/v12/httptest"
|
||||
)
|
||||
|
||||
|
@ -20,7 +21,9 @@ func TestContentNegotiation(t *testing.T) {
|
|||
expectedHTMLResponse = "<h1>Test Name</h1><h2>Age 26</h2>"
|
||||
)
|
||||
|
||||
e := httptest.New(t, newApp())
|
||||
app := newApp()
|
||||
app.Configure(iris.WithOptimizations)
|
||||
e := httptest.New(t, app)
|
||||
|
||||
e.GET("/resource").WithHeader("Accept", "application/json").
|
||||
Expect().Status(httptest.StatusOK).
|
||||
|
|
|
@ -1060,7 +1060,13 @@ func getCaller() (string, int) {
|
|||
continue
|
||||
}
|
||||
|
||||
if !strings.Contains(file, "/kataras/iris") || strings.Contains(file, "/kataras/iris/_examples") || strings.Contains(file, "iris-contrib/examples") {
|
||||
if strings.Contains(file, ".amd64/src/") {
|
||||
continue
|
||||
}
|
||||
|
||||
if !strings.Contains(file, "/kataras/iris") ||
|
||||
strings.Contains(file, "/kataras/iris/_examples") ||
|
||||
strings.Contains(file, "iris-contrib/examples") {
|
||||
if relFile, err := filepath.Rel(wd, file); err == nil {
|
||||
file = "./" + relFile
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user