File: 10-comments.t

package info (click to toggle)
libtext-sass-perl 1.0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 312 kB
  • sloc: perl: 825; makefile: 58
file content (30 lines) | stat: -rw-r--r-- 569 bytes parent folder | download | duplicates (4)
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
use strict;
use warnings;
use Test::More tests => 1;
use Text::Sass;

{
  my $str = <<"EOT";
/* This comment is
 * several lines long.
 * since it uses the CSS comment syntax,
 * it will appear in the CSS output. */
body { color: black; }

// These comments are only one line long each.
// They won't appear in the CSS output,
// since they use the single-line comment syntax.
a { color: green; }
EOT

  my $sass = Text::Sass->new;
  is($sass->scss2css($str), <<"EOT", "strip multi-line and single-line comments");
body {
  color: black;
}

a {
  color: green;
}
EOT
}