# Path: rock/utils.py
# def isexecutable(path):
#     def isstr(s):
#     def isstr(s):
# def raw(text):
#     def __init__(self):
#     def __enter__(self):
#     def __exit__(self, type, value, traceback):
#     def run(self):
#     def write(self, text):
# class Shell(object):
# 
# Path: rock/exceptions.py
# class ConfigError(Error):
#     pass


import helper
from rock import utils
from rock.exceptions import ConfigError
from __future__ import unicode_literals



class ProjectTestCase(helper.unittest.TestCase):

    def setUp(self):
        helper.setenv()
        def execl(*args):
            self.args = args
        utils.os.execl = execl
        self.p = helper.project()

    @property
    def split(self):
        return self.args[3].split('\n# script\n', 1)

    @property
    def script(self):
        return self.split[1].strip()

    def test_arg(self):
        self.p.run('clean', ['--six', '--zero', 'one', '--two=2', 'three', 'four', '--five=five', '--six'])
        data = {}
        for value in self.split[0].split('\n'):
            if not value.startswith('export '):
                continue

# Path: rock/utils.py
# def isexecutable(path):
#     def isstr(s):
#     def isstr(s):
# def raw(text):
#     def __init__(self):
#     def __enter__(self):
#     def __exit__(self, type, value, traceback):
#     def run(self):
#     def write(self, text):
# class Shell(object):
# 
# Path: rock/exceptions.py
# class ConfigError(Error):
#     pass


# Path: tests/test_project.py
import helper
from rock import utils
from rock.exceptions import ConfigError

from __future__ import unicode_literals



class ProjectTestCase(helper.unittest.TestCase):

    def setUp(self):
        helper.setenv()
        def execl(*args):
            self.args = args
        utils.os.execl = execl
        self.p = helper.project()

    @property
    def split(self):
        return self.args[3].split('\n# script\n', 1)

    @property
    def script(self):
        return self.split[1].strip()

    def test_arg(self):
        self.p.run('clean', ['--six', '--zero', 'one', '--two=2', 'three', 'four', '--five=five', '--six'])
        data = {}
        for value in self.split[0].split('\n'):
            if not value.startswith('export '):
                continue

            name = value.split(' ', 1)[1]