diff tests/test-releasenotes-formatting.t @ 33881:6a49c74b1e8f

releasenotes: add check flag for use of admonitions and its validity While using releasenotes extension, we will be using admonitions in commit messages. The check (-c) flag will look for an admonition within the message. If it exists, it will verify if it is stated under default or custom admonition. The check fails if the admonition is not present in any of them. It also suggests similar admonitions in case the admonition is invalid. Differential Revision: https://phab.mercurial-scm.org/D368
author Rishabh Madan <rishabhmadan96@gmail.com>
date Sun, 13 Aug 2017 19:58:45 +0530
parents 3748098d072a
children 2a37459aedf2
line wrap: on
line diff
--- a/tests/test-releasenotes-formatting.t	Tue Aug 22 16:16:39 2017 +0200
+++ b/tests/test-releasenotes-formatting.t	Sun Aug 13 19:58:45 2017 +0530
@@ -378,3 +378,32 @@
   
   * Adds a new feature.
 
+  $ cd ..
+
+Testing output for the --check (-c) flag
+
+  $ hg init check-flag
+  $ cd check-flag
+
+  $ touch a
+  $ hg -q commit -A -l - << EOF
+  > .. asf::
+  > 
+  >    First paragraph under this admonition.
+  > EOF
+
+Suggest similar admonition in place of the invalid one.
+
+  $ hg releasenotes -r . -c
+  Invalid admonition 'asf' present in changeset 4026fe9e1c20
+
+  $ touch b
+  $ hg -q commit -A -l - << EOF
+  > .. fixes::
+  > 
+  >    First paragraph under this admonition.
+  > EOF
+
+  $ hg releasenotes -r . -c
+  Invalid admonition 'fixes' present in changeset 0e7130d2705c
+  (did you mean fix?)