Skip to content

Commit

Permalink
all: Run gofumpt -l -w .
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jun 20, 2022
1 parent ca9a239 commit 51dd057
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
7 changes: 3 additions & 4 deletions transpiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ import (
"fmt"
"io"
"net/url"
"path"
"strings"
"time"

"os"
"os/exec"
"path"
"strings"
"sync"
"time"

"github.com/cli/safeexec"

Expand Down
13 changes: 3 additions & 10 deletions transpiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ body
} else {
expectedResult := test.expect.(Result)
c.Assert(err, qt.IsNil)
//printJSON(result.SourceMap)
// printJSON(result.SourceMap)
c.Assert(result, qt.Equals, expectedResult)

}
Expand Down Expand Up @@ -175,11 +175,11 @@ func TestIncludePaths(t *testing.T) {

ioutil.WriteFile(colors, []byte(`
$moo: #f442d1 !default;
`), 0644)
`), 0o644)

ioutil.WriteFile(content, []byte(`
content { color: #ccc; }
`), 0644)
`), 0o644)

c := qt.New(t)
src := `
Expand All @@ -199,7 +199,6 @@ div { p { color: $moo; } }`
)
c.Assert(err, qt.IsNil)
c.Assert(result.CSS, qt.Equals, "content{color:#ccc}div p{color:#f442d1}")

}

func TestTranspilerParallel(t *testing.T) {
Expand Down Expand Up @@ -234,12 +233,10 @@ func TestTranspilerParallelImportResolver(t *testing.T) {
c := qt.New(t)

createImportResolver := func(width int) ImportResolver {

return testImportResolver{
name: "widths",
content: fmt.Sprintf(`$width: %d`, width),
}

}

transpiler, clean := newTestTranspiler(c, Options{})
Expand All @@ -253,7 +250,6 @@ func TestTranspilerParallelImportResolver(t *testing.T) {
defer wg.Done()

for j := 0; j < 10; j++ {

for k := 0; k < 20; k++ {
args := Args{
OutputStyle: OutputStyleCompressed,
Expand All @@ -276,7 +272,6 @@ div { p { width: $width; } }`,
}

wg.Wait()

}

func TestTranspilerClose(t *testing.T) {
Expand Down Expand Up @@ -408,7 +403,6 @@ func TestHasScheme(t *testing.T) {
c.Assert(hasScheme("http://foo"), qt.Equals, true)
c.Assert(hasScheme("123:foo"), qt.Equals, false)
c.Assert(hasScheme("foo"), qt.Equals, false)

}

func newTestTranspiler(c *qt.C, opts Options) (*Transpiler, func()) {
Expand Down Expand Up @@ -437,5 +431,4 @@ func printJSON(s string) {
json.Unmarshal([]byte(s), &m)
b, _ := json.MarshalIndent(m, "", " ")
fmt.Printf("%s", b)

}

0 comments on commit 51dd057

Please sign in to comment.