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

login
register
mail settings
Submitter Augie Fackler
Date Sept. 21, 2017, 2:25 p.m.
Message ID <4aa78b29fd1e14540b0b.1506003954@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/24081/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 21, 2017, 2:25 p.m.
# HG changeset patch
# User Augie Fackler <augie@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.

Patch

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