[PATCH 2 of 2] tests: add a test for blackbox with nested alias configurations

Augie Fackler raf at durin42.com
Thu Sep 21 10:25:54 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1505174861 14400
#      Mon Sep 11 20:07:41 2017 -0400
# Node ID 4aa78b29fd1e14540b0be134297fb84fcf305ec0
# Parent  0878fba873527c814b1ad15d43e89adf62c11d37
tests: add a test for blackbox with nested alias configurations

I've observed some weirdness around this, and needed to rule some
things out. There aren't any bugs in core around this, but it was nice
to have confirmation.

diff --git a/tests/test-blackbox.t b/tests/test-blackbox.t
--- a/tests/test-blackbox.t
+++ b/tests/test-blackbox.t
@@ -6,6 +6,7 @@ setup
   > mq=
   > [alias]
   > confuse = log --limit 3
+  > so-confusing = confuse --style compact
   > EOF
   $ hg init blackboxtest
   $ cd blackboxtest
@@ -29,6 +30,16 @@ alias expansion is logged
   1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> confuse exited 0 after * seconds (glob)
   1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
 
+recursive aliases work correctly
+  $ rm ./.hg/blackbox.log
+  $ hg so-confusing
+  $ hg blackbox
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> so-confusing
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> alias 'so-confusing' expands to 'confuse --style compact'
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> alias 'confuse' expands to 'log --limit 3'
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> so-confusing exited 0 after * seconds (glob)
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
+
 incoming change tracking
 
 create two heads to verify that we only see one change in the log later


More information about the Mercurial-devel mailing list