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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
package libsass
import (
"bytes"
"fmt"
"strings"
"testing"
)
func TestUnicode(t *testing.T) {
t.Skip("unicode can not be stored in variables")
var dst bytes.Buffer
src := bytes.NewBufferString(`
$test: "\f00d";
p {
a {
content: $test;
}
b {
content: "\f00c";
}
}
`)
comp, err := New(&dst, src)
if err != nil {
t.Error("Expected to create compiler successfully")
}
err = comp.Run()
if err != nil {
t.Error("Expected to run the compiler successfully")
}
css := dst.String()
if !strings.Contains(css, "\\f00c") { // This one is passing
t.Errorf("Expected to find `%s` in compiled css", "\\f00c")
}
if !strings.Contains(css, "\\f00d") { // This one isn't
t.Errorf("Expected to find `%s` in compiled css", "\\f00d")
}
fmt.Println(dst.String())
}
|