mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 23:54:12 +03:00
e0e01cbc81
Summary: This broke a bunch of tests. Revert it and re-enable all the tests. Reviewed By: DurhamG Differential Revision: D19665042 fbshipit-source-id: c3c17e3ac7e2ea028be5b5836bc8349cdf56184e
44 lines
769 B
Perl
44 lines
769 B
Perl
#chg-compatible
|
|
|
|
Initialize scm prompt compatibility layer
|
|
$ . $TESTDIR/../contrib/scm-prompt.sh
|
|
|
|
$ cmd() {
|
|
> "$@"
|
|
> _dotfiles_scm_info
|
|
> }
|
|
|
|
A few basic tests
|
|
$ _dotfiles_scm_info
|
|
$ hg init repo
|
|
$ cmd cd repo
|
|
(empty) (no-eol)
|
|
$ echo a > a
|
|
$ cmd hg add a
|
|
(00000000) (no-eol)
|
|
$ cmd hg commit -m 'c1'
|
|
(5cad84d1) (no-eol)
|
|
$ cmd hg book active
|
|
(active) (no-eol)
|
|
|
|
Test old mode
|
|
$ export WANT_OLD_SCM_PROMPT
|
|
$ WANT_OLD_SCM_PROMPT=1
|
|
$ cmd hg book -i
|
|
5cad84d1 (no-eol)
|
|
$ cmd hg book active
|
|
active (no-eol)
|
|
|
|
Test format string
|
|
$ oldcmd() {
|
|
> "$@"
|
|
> _dotfiles_scm_info "g g %s g g\n"
|
|
> }
|
|
$ hg init repo
|
|
$ oldcmd cd repo
|
|
g g empty g g
|
|
|
|
Test main prompt with no format string
|
|
$ _scm_prompt
|
|
(empty) (no-eol)
|