mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
59d15d70c8
Summary: Regression that wasn't tested by the tests before Test Plan: This is now tested with a new test Reviewers: #fbhgext, mjpieters Reviewed By: mjpieters Differential Revision: https://phab.mercurial-scm.org/D823
42 lines
749 B
Perl
42 lines
749 B
Perl
Initialize scm prompt compatibility layer
|
|
$ . $TESTDIR/../scripts/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
|
|
(0000000) (no-eol)
|
|
$ cmd hg commit -m 'c1'
|
|
(5cad84d) (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
|
|
5cad84d (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)
|