��Qc@s�dZddlZddlZddlmZddlmZddlmZddl m
Z
dejejej
fd��YZd �Zed
kr�e
e��ndS(s,Tests for distutils.command.install_scripts.i�N(tinstall_scripts(tDistribution(tsupport(trun_unittesttInstallScriptsTestCasecBseZd�Zd�ZRS(cCs�t�}tjdd�|jd<tjdddddd�|jd <t|�}|j|j�|j|j�|j|jdk�|j|j
dk�|j�|j|j�|j|j�|j|jd�|j|j
d�dS(
Nt
build_scriptss/foo/bartbuildRs/splat/funktforceit
skip_buildtinstall(
RRtDummyCommandtcommand_objRt
assertTrueRRt build_dirtNonetinstall_dirtfinalize_optionstassertEqual(tselftdisttcmd((s:/sys/lib/python2.7/distutils/tests/test_install_scripts.pyttest_default_settingss"
cs�|j��g���fd�}|dd�|dd�|dd�|j�}t�}tjd��|jd <tjd
|ddd
d�|jd<t|�}|j�|j�tj |�}x!�D]}|j
||k�q�WdS(NcsN�j|�ttjj�|�d�}z|j|�Wd|j�XdS(Ntw(tappendtopentostpathtjointwritetclose(tnamettexttf(texpectedtsource(s:/sys/lib/python2.7/distutils/tests/test_install_scripts.pytwrite_script+s
s
script1.pys@#! /usr/bin/env python2.3
# bogus script w/ Python sh-bang
pass
s
script2.pys8#!/usr/bin/python
# bogus script w/ Python sh-bang
pass
sshell.shs1#!/bin/sh
# bogus shell script w/ sh-bang
exit 0
RRRRiRR (tmkdtempRRR
RRRtrunRtlistdirR(RR#ttargetRRt installedR((R!R"s:/sys/lib/python2.7/distutils/tests/test_install_scripts.pyttest_installation's&
(t__name__t
__module__RR)(((s:/sys/lib/python2.7/distutils/tests/test_install_scripts.pyR
s cCs
tjt�S(N(tunittestt makeSuiteR(((s:/sys/lib/python2.7/distutils/tests/test_install_scripts.pyt
test_suiteNst__main__(t__doc__RR,t!distutils.command.install_scriptsRtdistutils.coreRtdistutils.testsRttest.test_supportRtTempdirManagertLoggingSilencertTestCaseRR.R*(((s:/sys/lib/python2.7/distutils/tests/test_install_scripts.pyt<module>s ?
|