diff tests/test-topic-stack.t @ 2805:a789b9d5b60c stable

topic: make command names valid as expected, even if ui.strict=true Before this patch, "hg topics" and "hg stack" cause unintentional "unknown command" failure, if ui.strict=true. In such case, "topics [TOPIC]" and "stack [TOPIC]" are required as a canonical name, because synopsis-like string is used as command name pattern of @command annotation for them. This patch also specifies additional "synopsis" for @command annotation, for intentional output in online help of these commands.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 23 Jul 2017 13:30:28 +0900
parents bd3824d1b795
children f25c79365f5d 8874e65343a4
line wrap: on
line diff
--- a/tests/test-topic-stack.t	Tue Jul 25 14:56:52 2017 +0200
+++ b/tests/test-topic-stack.t	Sun Jul 23 13:30:28 2017 +0900
@@ -187,6 +187,29 @@
       }
   ]
 
+check that topics and stack are available even if ui.strict=true
+
+  $ hg topics
+   * foo
+  $ hg stack
+  ### topic: foo
+  ### branch: default
+  t4@ c_f (current)
+  t3: c_e
+  t2: c_d
+  t1: c_c
+  t0^ c_b (base)
+  $ hg topics --config ui.strict=true
+   * foo
+  $ hg stack --config ui.strict=true
+  ### topic: foo
+  ### branch: default
+  t4@ c_f (current)
+  t3: c_e
+  t2: c_d
+  t1: c_c
+  t0^ c_b (base)
+
 error case, nothing to list
 
   $ hg topic --clear