/usr/share/gocode/src/github.com/dchest/cssmin/cssmin_test.go is in golang-github-dchest-cssmin-dev 0.0~git20151210.0.fb8d9b4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 50 51 52 53 54 55 56 | package cssmin
import (
"testing"
)
func TestMinify(t *testing.T) {
for i, v := range tests {
min := Minify([]byte(v.input))
if string(min) != v.output {
t.Fatalf("%d: expected:\n%s\ngot:\n%s\n", i, v.output, min)
}
}
}
var tests = []struct {
input, output string
}{
{`
body {
padding: 0 0 0 0;
margin-left: 0px;
margin-right: 1px;
color: #cceeff;
background: #aabbc0;
}
.hello,
div.welcome {
background-color: red; /* or green? */
color: rgb(0, 16, 255);
}`,
`body{padding:0;margin-left:0;margin-right:1px;color:#cef;background:#aabbc0}.hello,div.welcome{background-color:red;color:#0010ff}`,
},
// comments.css
{`/*****
Multi-line comment
before a new class name
*****/
.classname {
/* comment in declaration block */
font-weight: normal;
}`,
`.classname{font-weight:normal}`,
},
// media_queries.css
{`@media screen and (-webkit-min-device-pixel-ratio:0) {
some-css : here
}`,
`@media screen and (-webkit-min-device-pixel-ratio:0){some-css:here}`,
},
}
|