-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyc

ó
`aïNc@sñddlZddlZddlmZmZddlmZddlTddlZdefd„ƒYZ	dej
e	fd„ƒYZd	eje	fd
„ƒYZ
dej
fd„ƒYZd
ej
fd„ƒYZdej
fd„ƒYZdS(iÿÿÿÿN(tcommandsttests(tfeatures(t*tBashCompletionMixincBsPeZdZejgZdZdd„Zd„Z	d„Z
d„Zd„ZRS(s<Component for testing execution of a bash completion script.iÿÿÿÿc
	Csù|jdkr!|jƒ|_ntjtjjdgdtjdtjdtjƒ}|dkrvt	|ƒ|}nd|j}|ddj
g|D] }d	|jd	d
ƒd	^q–ƒ7}|d|7}|dt|dd
ƒ7}|d7}|d7}|d7}|j
|ƒ\}}d|kr;td|ƒ‚n|jd|dƒ|jdƒ}t|dƒ}	|d=|jd|ddƒ|d=|	dkrÊt	|ƒdkrÊ|ddkrÊ|d=n|j|	t	|ƒdƒt|ƒ|_|jS(sºPerform a bash completion.

        :param words: a list of words representing the current command.
        :param cword: the current word to complete, defaults to the last one.
        s--noprofiletstdintstdouttstderris%s
sCOMP_WORDS=( %s )
t t's'\''sCOMP_CWORD=%d
tscript_namet_bzrsecho ${#COMPREPLY[*]}
s
IFS=$'\n'
secho "${COMPREPLY[*]}"
tsUnexpected error message:
%ssNo messages to standard errors
iÿÿÿÿsNewline at endisNo newlines in generated wordsN(tscripttNonet
get_scriptt
subprocesstPopenRtbash_featuretpathtPIPEtlentjointreplacetgetattrtcommunicatetAssertionErrortassertEqualtsplittinttsettcompletion_result(
tselftwordstcwordtproctinputtwtoutterrtlinestnlines((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pytcomplete!s>			
8


.
cGs|jt|ƒ|jƒdS(N(RRR(R R!((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pytassertCompletionEqualsIscGs9t|ƒ|j}|r5td||jfƒ‚ndS(Ns*Completion should contain %r but it has %r(RRR(R R!tmissing((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pytassertCompletionContainsLscGs<t|ƒ|j@}|r8td|t|jfƒ‚ndS(Ns'Completion should omit %r but it has %r(RRRtres(R R!tsurplus((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pytassertCompletionOmitsRscCs;tjƒtƒ}|jƒ}t|ƒ}|jƒ}|S(N(Rtinstall_bzr_command_hookst
DataCollectortcollecttBashCodeGentfunction(R tdctdatatcgR.((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRXs
	N(
t__name__t
__module__t__doc__RRt_test_needs_featuresRR
R*R+R-R0R(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRs(			tTestBashCompletioncBsVeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s-Test bash completions that don't execute bzr.cCs?d|_|jdddgddƒ|jddd	d
ƒdS(s.Ensure that the test harness works as expecteds
_bzr() {
    COMPREPLY=()
    # add all words in reverse order, with some markup around them
    for ((i = ${#COMP_WORDS[@]}; i > 0; --i)); do
        COMPREPLY+=( "-${COMP_WORDS[i-1]}+" )
    done
    # and append the current word
    COMPREPLY+=( "+${COMP_WORDS[COMP_CWORD]}-" )
}
tfoos"bars'bazR"is-'baz+s-"bar+s-foo+s+"bar-N(R
R*R+(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_simple_sciptds	cCs7|jddgƒ|jdddƒ|jdƒdS(Ntbzrtinitinits	init-reposinit-repositorytcommit(R*R-R0(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_cmd_initscCs-|jdddgƒ|jdddƒdS(NR@RBt-s-hs--2as--format=2a(R*R-(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_init_optsyscCs0|jdddgddƒ|jddƒdS(NR@RERBR"is--no-pluginss	--builtin(R*R-(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_global_opts}scCs'|jdddgƒ|jdƒdS(NR@RCs-m(R*R+(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_commit_dashmscCs*|jdddgƒ|jddƒdS(NR@tstatuss--ns--no-versioneds--no-verbose(R*R-(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_status_negated…scCs6|jdddddgddƒ|jdd	ƒdS(
NR@RBs--formatt=t	directoryR"is1.9t2a(R*R-(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_init_format_any‰s"cCsC|jddddddgddƒ|jd	ƒ|jd
ƒdS(NR@RBs--formatRKt2RLR"iRMs1.9(R*R-R0(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_init_format_2s
(R9R:R;R?RDRFRGRHRJRNRP(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyR=as							tTestBashCompletionInvokingcBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sºTest bash completions that might execute bzr.

    Only the syntax ``$(bzr ...`` is supported so far. The bzr command
    will be replaced by the bzr instance running this selftest.
    cCs8tt|ƒjƒtjdkr4tjdƒ‚ndS(Ntwin32s0see bug #709104, completion is broken on windows(tsuperRQtsetUptsystplatformRtKnownFailure(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRTœscCs/tt|ƒjƒ}|jdd|jƒƒS(Ns$(bzr s$('%s' (RSRQRRtget_bzr_path(R ts((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyR¢scCsš|jtjƒ|jdddƒ}|jjjddƒ|jjjddƒ|jjjddƒ|jdd	d
ddgƒ|jdddƒdS(
Nt.tformats
dirstate-tagsttag1snull:ttag2t3tagR@tlogs-rttagt:(	trequireFeatureRtsed_featuretmake_branch_and_treetbranchttagstset_tagR*R+(R twt((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_revspec_tag_all¦scCsš|jtjƒ|jdddƒ}|jjjddƒ|jjjddƒ|jjjddƒ|jdd	d
ddd
gƒ|jddƒdS(NRZR[s
dirstate-tagsR\snull:R]R^R@R_s-rR`Ratt(	RbRRcRdReRfRgR*R+(R Rh((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_revspec_tag_prefix¯scCs·|jtjƒ|jdddƒ}|jjjddƒ|jdddd	d
dgƒ|jdƒ|jdddd
gƒ|jdƒ|jddddgƒ|jdƒdS(NRZR[s
dirstate-tagsstag with spacessnull:R@R_s-rR`RaRjstag\ with\ spacess"tag:tstag:tag with spacess'tag:t(	RbRRcRdReRfRgR*R+(R Rh((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_revspec_tag_spaces¸s

cCsÖ|jtjƒ|jdddƒ}|jjjddƒ|jjjddƒ|jddd	d
ddgƒ|jddƒ|jddd	d
gƒ|jddƒ|jddd	dgƒ|jddƒdS(NRZR[s
dirstate-tagsR\snull:R]R@R_s-rs3..tagRaRjs	"3..tag:ts3..tag:tag1s3..tag:tag2s	'3..tag:t(	RbRRcRdReRfRgR*R+(R Rh((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_revspec_tag_endrangeÃs(	R9R:R;RTRRiRkRlRm(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRQ”s							tTestBashCodeGencBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsqtƒ}tdƒ}|jjdƒ|jj|ƒ|jjtdƒƒt|ƒ}|jd|jƒƒdS(NtbartbazR>sbar baz foo(tCompletionDatatCommandDatataliasestappendRR4Rt
command_names(R R7RoR8((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_command_namesÒs	cCsNtƒ}|jdt|dtƒjƒƒ|jt|dtƒjƒƒdS(NRtdebug(RqRR4tFalsetdebug_outputt
assertTruetTrue(R R7((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_debug_outputÛs	"cCs‹tƒ}t|ƒ}|jdtj|jƒƒtddƒ|jd<tddƒ|jd<t|ƒ}|jdtj|jƒƒdS(Ns%s.R>s1.0Ros2.0s1%s and the following plugins:
# bar 2.0
# foo 1.0(RqR4Rtbzrlibtversion_stringtbzr_versiont
PluginDatatplugins(R R7R8((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_bzr_versionàs	cCsOtƒ}|jjdƒ|jjdƒt|ƒ}|jd|jƒƒdS(Ns--foos--bars--bar --foo(Rqtglobal_optionstaddR4R(R R7R8((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_global_optionsìs
	cCs‡tƒ}tdƒ}|jjdƒ|jjtdƒƒ|jj|ƒ|jjtdƒƒt|ƒ}|jd|j	ƒƒdS(NRoRps--optR>s=	bar|baz)
		cmdOpts=( --opt )
		;;
	foo)
		cmdOpts=(  )
		;;
(
RqRrRsRttoptionst
OptionDataRR4tassertEqualDifft
command_cases(R R7RoR8((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_command_casesós	cCs±tdƒ}tddƒ|_tdƒ}ddg|_|jjdƒ|jj|ƒ|jjtdƒƒtƒ}|j	j|ƒt
|ƒ}|jd	|j|ƒƒdS(
Ntcmdtpluggers1.0s--bartthattthissSome error messages--foos¢	cmd)
		# plugin "plugger 1.0"
		# Some error message
		cmdOpts=( --bar=that --bar=this --foo )
		case $curOpt in
			--bar) optEnums=( that this ) ;;
		esac
		;;
(
RrR€tpluginR‡t
registry_keysterror_messagesRtR†RqRR4Rˆtcommand_case(R R‹RoR7R8((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_command_cases		(R9R:RvR|R‚R…RŠR“(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRnÐs						tTestDataCollectorcBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs!tt|ƒjƒtjƒdS(N(RSR”RTRR1(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRTscCs3tƒ}|jƒ|jddg|jjƒdS(Ns--no-pluginss	--builtin(R2RƒtassertSubsetR7(R R6((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyR…!s	
cCs9tƒ}|jƒ|jdddg|jjƒƒdS(NRBs	init-reposinit-repository(R2RR•R7tall_command_aliases(R R6((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyt
test_commands's	
cCs3tƒ}|jƒ|jdg|jjƒƒdS(Nsbash-completion(R2RR•R7R–(R R6((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_commands_from_plugins-s	
cCsKtƒ}|jdƒ}|jdgg|jD]}t|ƒ^q.ƒdS(NRCs-m(R2tcommandR•R†tstr(R R6R‹to((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRH3s	cCsNtƒ}|jdƒ}|jddgg|jD]}t|ƒ^q1ƒdS(NRIs--no-versioneds--no-verbose(R2R™R•R†Rš(R R6R‹R›((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRJ9s	cCsetƒ}|jdƒ}x:|jD]/}|jdkr"|jdg|jƒdSq"Wtdƒ‚dS(NRBs--formatRMsOption --format not found(R2R™R†tnameR•RR(R R6R‹topt((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_init_format?s	(	R9R:RTR…R—R˜RHRJRž(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyR”s						t
BlackboxTestscBseZd„ZRS(cCs|jdƒdS(Nsbash-completion(trun_bzr(R ((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyttest_bash_completionKs(R9R:R¡(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyRŸIs(RUR}RRtbzrlib.testsRt'bzrlib.plugins.bash_completion.bashcompRtobjectRtTestCaseR=tTestCaseWithTransportRQRnR”RŸ(((sV/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/tests/test_bashcomp.pyt<module>s
F3	;K.

Copyright © 2017 || Recoded By Mr.Bumblebee