# Path: staticassets/finder.py
# class BaseAssetFinder(object):
# class AssetFinder(BaseAssetFinder):
#     def find(self, path, bundle=False, **options):
#     def __init__(self):
#     def find(self, path, **options):
#     def resolve(self, path, **options):
#     def list(self):
#     def get_search_regex(self, path, content_type=None):
#     def get_cache_key(self, path, options):
# def find(*args, **kwargs):
# def resolve(*args, **kwargs):
# 
# Path: tests/test.py
# class TestCase(BaseTestCase):
#     fixtures_dir = 'default'
# 
#     def fixture_path(self, path):
#         return os.path.join(FIXTURES_ROOT, self.fixtures_dir, path)
# 
#     def fixture(self, path):
#         return read_file(self.fixture_path(path))
# 
#     def file_digest(self, path):
#         return get_digest(read_file(path))
# 
#     def tearDown(self):
#         cache.clear()


from staticassets import finder
from .test import TestCase
JST_TEST = """
(function() { this.JST || (this.JST = {}); this.JST['templates/list'] = <ul>
  <li>Item list</li>
</ul>
;}).call(this);
""".strip('\n')


class CompilersTest(TestCase):
    fixtures_dir = 'compilers'

    def test_compile_sass(self):
        self.assertEqual(SASS_TEST, finder.find('foo.sass').content.strip('\n'))

    # def test_compile_scss_with_compass(self):
    #     self.assertEqual(SCSS_TEST, finder.find('compass.scss').content.strip('\n'))

    def test_compile_stylus(self):
        self.assertEqual(STYLUS_TEST, finder.find('stylus.styl').content.strip('\n'))

    def test_compile_less(self):
        self.assertEqual(LESS_TEST, finder.find('bar.less').content.strip('\n'))

    def test_compile_coffeescript(self):
        self.assertEqual(COFFEESCRIPT_TEST, finder.find('coffeescript.coffee').content.strip('\n'))

    def test_compile_ejs(self):
        self.assertEqual(EJS_TEST, finder.find('templates/detail.ejs').content.strip('\n'))

    def test_compile_jst(self):

# Path: staticassets/finder.py
# class BaseAssetFinder(object):
# class AssetFinder(BaseAssetFinder):
#     def find(self, path, bundle=False, **options):
#     def __init__(self):
#     def find(self, path, **options):
#     def resolve(self, path, **options):
#     def list(self):
#     def get_search_regex(self, path, content_type=None):
#     def get_cache_key(self, path, options):
# def find(*args, **kwargs):
# def resolve(*args, **kwargs):
# 
# Path: tests/test.py
# class TestCase(BaseTestCase):
#     fixtures_dir = 'default'
# 
#     def fixture_path(self, path):
#         return os.path.join(FIXTURES_ROOT, self.fixtures_dir, path)
# 
#     def fixture(self, path):
#         return read_file(self.fixture_path(path))
# 
#     def file_digest(self, path):
#         return get_digest(read_file(path))
# 
#     def tearDown(self):
#         cache.clear()


# Path: tests/test_compilers.py
from staticassets import finder
from .test import TestCase

JST_TEST = """
(function() { this.JST || (this.JST = {}); this.JST['templates/list'] = <ul>
  <li>Item list</li>
</ul>
;}).call(this);
""".strip('\n')


class CompilersTest(TestCase):
    fixtures_dir = 'compilers'

    def test_compile_sass(self):
        self.assertEqual(SASS_TEST, finder.find('foo.sass').content.strip('\n'))

    # def test_compile_scss_with_compass(self):
    #     self.assertEqual(SCSS_TEST, finder.find('compass.scss').content.strip('\n'))

    def test_compile_stylus(self):
        self.assertEqual(STYLUS_TEST, finder.find('stylus.styl').content.strip('\n'))

    def test_compile_less(self):
        self.assertEqual(LESS_TEST, finder.find('bar.less').content.strip('\n'))

    def test_compile_coffeescript(self):
        self.assertEqual(COFFEESCRIPT_TEST, finder.find('coffeescript.coffee').content.strip('\n'))

    def test_compile_ejs(self):
        self.assertEqual(EJS_TEST, finder.find('templates/detail.ejs').content.strip('\n'))

    def test_compile_jst(self):

        self.assertEqual(JST_TEST, finder.find('templates/list.jst').content.strip('\n'))