File: cssmin-test.py

package info (click to toggle)
cssmin 0.2.0-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 132 kB
  • sloc: python: 153; sh: 19; makefile: 7
file content (24 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Quick and dirty smoke test of the cssmin importer module
#
# Based on the example code for using cssmin and licensed under the same terms
# as cssmin itself.
#
# Stuart Prescott 2016

from __future__ import print_function

import cssmin
import sys

with open('input.css') as infile:
    test_output = cssmin.cssmin(infile.read())

with open('good-output.min.css') as outfile:
    good_output = outfile.read()

if test_output == good_output:
    print("Test output same as know good output")
    sys.exit(0)
else:
    print("ERROR: test output differs from known good output")
    sys.exit(1)