tests/test-encoding-textwrap.t
changeset 21254 51e5c793a9f4
parent 21024 7731a2281cf0
child 22110 26f7c8033bed
--- a/tests/test-encoding-textwrap.t	Sun May 04 21:33:14 2014 -0700
+++ b/tests/test-encoding-textwrap.t	Sun May 04 22:48:07 2014 -0700
@@ -6,7 +6,13 @@
 define commands to display help text
 
   $ cat << EOF > show.py
+  > from mercurial import cmdutil
+  > 
+  > cmdtable = {}
+  > command = cmdutil.command(cmdtable)
+  > 
   > # Japanese full-width characters:
+  > @command('show_full_ja', [], '')
   > def show_full_ja(ui, **opts):
   >     u'''\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051 \u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051
   > 
@@ -16,6 +22,7 @@
   >     '''
   > 
   > # Japanese half-width characters:
+  > @command('show_half_ja', [], '')
   > def show_half_ja(ui, *opts):
   >     u'''\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79 \uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79
   > 
@@ -25,6 +32,7 @@
   >     '''
   > 
   > # Japanese ambiguous-width characters:
+  > @command('show_ambig_ja', [], '')
   > def show_ambig_ja(ui, **opts):
   >     u'''\u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb \u03b1\u03b2\u03b3\u03b4\u03c5\u03b6\u03b7\u03b8\u25cb
   > 
@@ -34,6 +42,7 @@
   >     '''
   > 
   > # Russian ambiguous-width characters:
+  > @command('show_ambig_ru', [], '')
   > def show_ambig_ru(ui, **opts):
   >     u'''\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
   > 
@@ -41,13 +50,6 @@
   > 
   >     \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
   >     '''
-  > 
-  > cmdtable = {
-  >     'show_full_ja': (show_full_ja, [], ""),
-  >     'show_half_ja': (show_half_ja, [], ""),
-  >     'show_ambig_ja': (show_ambig_ja, [], ""),
-  >     'show_ambig_ru': (show_ambig_ru, [], ""),
-  > }
   > EOF
 
 "COLUMNS=60" means that there is no lines which has grater than 58 width