File: toscss_test.go

package info (click to toggle)
golang-github-wellington-go-libsass 0.9.2%2Bgit20181130.4ef5b9d-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,128 kB
  • sloc: cpp: 28,607; ansic: 839; makefile: 44
file content (34 lines) | stat: -rw-r--r-- 378 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package libsass

import (
	"bytes"
	"testing"
)

func TestToScss(t *testing.T) {
	in := bytes.NewBufferString(`html,
body,
ul,
ol
  margin:  0
  padding: 0
`)

	var b bytes.Buffer
	err := ToScss(in, &b)
	if err != nil {
		t.Fatal(err)
	}

	e := `html,
body,
ul,
ol {
  margin:  0;
  padding: 0; }
`
	if b.String() != e {
		t.Errorf("got:\n%s\nwanted:\n%s", b.String(), e)
	}

}