1 """
2 testcases for cssutils.scripts.csscombine
3 """
4 __author__ = '$LastChangedBy: cthedot $'
5 __date__ = '$LastChangedDate: 2008-01-12 21:28:54 +0100 (Sa, 12 Jan 2008) $'
6 __version__ = '$LastChangedRevision: 831 $'
7
8 import os
9 import basetest
10 from cssutils.scripts import csscombine
11 import cssutils
12
14
16 "scripts.csscombine"
17 csspath = os.path.join(os.path.dirname(__file__), '..', '..', '..',
18 'sheets', 'csscombine-proxy.css')
19 combined = csscombine(csspath)
20 self.assertEqual(combined,
21 '@charset "utf-8";a{color:green}body{color:#fff;background:#000}'
22 )
23 combined = csscombine(csspath, targetencoding='ascii')
24 self.assertEqual(combined,
25 '@charset "ascii";a{color:green}body{color:#fff;background:#000}'
26 )
27
28 cssutils.log.raiseExceptions = True
29
33
34
35
36
37 if __name__ == '__main__':
38 import unittest
39 unittest.main()
40