diff tests/test-topic.t @ 6392:faea18a26188 mercurial-5.9

test-compat: merge mercurial-6.0 into mercurial-5.9
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 06 Feb 2023 18:56:14 +0400
parents 36a746dda93a 9a41c3c293ae
children 1328195f76a9 b1712eeb97c6
line wrap: on
line diff
--- a/tests/test-topic.t	Thu Dec 08 19:31:00 2022 +0400
+++ b/tests/test-topic.t	Mon Feb 06 18:56:14 2023 +0400
@@ -254,13 +254,16 @@
   [1]
   $ hg topics --current somerandomtopic
   abort: cannot use --current when setting a topic
-  [255]
+  [10]
   $ hg topics --current --clear
   abort: cannot use --current and --clear
-  [255]
+  [10]
   $ hg topics --clear somerandomtopic
   abort: cannot use --clear when setting a topic
-  [255]
+  [10]
+  $ hg topics --list --clear
+  abort: cannot specify both --list and --clear
+  [10]
 
 Trying some invalid topicnames
 
@@ -277,18 +280,18 @@
   abort: cannot use an integer as a name
   [10]
   $ hg topic '   '
-  abort: topic name cannot consist entirely of whitespaces
-  [255]
+  abort: topic names cannot consist entirely of whitespace
+  [10]
 
   $ hg topic 'a12#45'
   abort: invalid topic name: 'a12#45'
   (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
-  [255]
+  [10]
 
   $ hg topic 'foo bar'
   abort: invalid topic name: 'foo bar'
   (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
-  [255]
+  [10]
 
 this is trying to list topic names
   $ hg topic ''
@@ -296,7 +299,7 @@
   $ hg topic '*12 B23'
   abort: invalid topic name: '*12 B23'
   (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
-  [255]
+  [10]
 
 Test commit flag and help text
 
@@ -317,6 +320,24 @@
   $ hg topic
    * topicflag (0 changesets)
 
+Non-ascii topic name
+
+  $ hg --encoding utf-8 topic æ
+  $ hg topics
+   * \xc3\xa6 (0 changesets) (esc)
+  $ hg --encoding latin1 topics
+   * \xc3\xa6 (0 changesets) (esc)
+
+  $ hg --encoding utf-8 topic ©
+  abort: invalid topic name: '\xc2\xa9' (esc)
+  (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
+  [10]
+
+  $ hg --encoding latin1 topic æ
+  abort: invalid topic name: '\xc3\xa6' (esc)
+  (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
+  [10]
+
 Make a topic
 
   $ hg topic narf
@@ -581,11 +602,11 @@
      fran  (1 changesets)
    * narf  (2 changesets)
      query (2 changesets)
-  $ hg debugnamecomplete # branch:topic here is a buggy side effect
+  $ hg debugnamecomplete
   default
-  default:fran
-  default:narf
-  default:query
+  default//fran
+  default//narf
+  default//query
   fran
   narf
   query
@@ -1136,7 +1157,7 @@
 
   $ hg topics --age random
   abort: cannot use --age while setting a topic
-  [255]
+  [10]
   $ cd ..
 
 Test that topics doesn't confuse branchheads checking logic