You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2018/11/09 11:36:30 UTC

svn commit: r1846234 - /subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py

Author: brane
Date: Fri Nov  9 11:36:29 2018
New Revision: 1846234

URL: http://svn.apache.org/viewvc?rev=1846234&view=rev
Log:
More tests for peg revision parsing.

* subversion/tests/cmdline/pegrev_parse_tests.py
  (make_dir_subdir_7_no_escape_peg): Update work-in-progress note.
  (remove_subdir_*): 12 new test cases.

Modified:
    subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py?rev=1846234&r1=1846233&r2=1846234&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py Fri Nov  9 11:36:29 2018
@@ -386,7 +386,7 @@ def make_dir_subdir_4_no_escape_peg(sbox
 #   - make_dir_subdir_5_escape_peg
 #   - make_dir_subdir_6_escape_peg
 
-@Wimp("The error message is EEXIST but should be E125001")
+@Wimp("Reports error that E exists but should be E125001 for E/@")
 def make_dir_subdir_7_no_escape_peg(sbox):
   "create directory 'E/@' without pegrev escape"
   do_make_dir(sbox, 'E/@', 'E/@', "svn: E125001: 'E/@'")
@@ -454,6 +454,69 @@ def remove_here_7_no_escape_peg(sbox):
   do_remove(sbox, '@', '@', "svn: E125001: '@'")
 
 #=====================================================================
+# Tests for 'svn remove' in a subdirectory directory
+
+def remove_subdir_1_escape_peg(sbox):
+  "remove 'A/alpha' with pegrev escape"
+  do_remove(sbox, 'A/alpha', 'A/alpha@')
+
+def remove_subdir_2_escape_peg(sbox):
+  "remove 'B/@beta' with pegrev escape"
+  do_remove(sbox, 'B/@beta', 'B/@beta@')
+
+def remove_subdir_3_escape_peg(sbox):
+  "remove 'G/_@gamma' with pegrev escape"
+  do_remove(sbox, 'G/_@gamma', 'G/_@gamma@')
+
+def remove_subdir_4_escape_peg(sbox):
+  "remove 'D/.@delta' with pegrev escape"
+  do_remove(sbox, 'D/.@delta', 'D/.@delta@')
+
+def remove_subdir_5_escape_peg(sbox):
+  "remove 'B/pi@' with pegrev escape"
+  do_remove(sbox, 'B/pi@', 'B/pi@@')
+
+def remove_subdir_6_escape_peg(sbox):
+  "remove 'A/@omega@' with pegrev escape"
+  do_remove(sbox, 'A/@omega@', 'A/@omega@@')
+
+def remove_subdir_7_escape_peg(sbox):
+  "remove 'B/@' with pegrev escape"
+  do_remove(sbox, 'B/@', 'B/@@')
+
+#---------------------------------------------------------------------
+
+def remove_subdir_1_no_escape_peg(sbox):
+  "remove 'A/alpha' without pegrev escape"
+  do_remove(sbox, 'A/alpha', 'A/alpha')
+
+@Wimp("The error message mentions 'B@beta' instead of 'B/@beta'")
+@Wimp("The error message should be E125001")
+def remove_subdir_2_no_escape_peg(sbox):
+  "remove 'B/@beta' without pegrev escape"
+  do_remove(sbox, 'B/@beta', 'B/@beta', "svn: E200009: 'B/@beta'")
+
+def remove_subdir_3_no_escape_peg(sbox):
+  "remove 'G/_@gamma' without pegrev escape"
+  do_remove(sbox, 'G/_@gamma', 'G/_@gamma', "svn: E200009: 'G/_@gamma'")
+
+@Wimp("The error message mentions 'D@delta' instead of 'D/.@delta'")
+def remove_subdir_4_no_escape_peg(sbox):
+  "remove 'D/.@delta' without pegrev escape"
+  do_remove(sbox, 'D/.@delta', 'D/.@delta', "svn: E200009: 'D/.@delta'")
+
+# Skip tests 5 and 6 that remove a node with a trailing @ in the name
+# because is correctly interpreted as a peg revision escape. This is already
+# tested by:
+#   - remove_subdir_5_escape_peg
+#   - remove_subdir__escape_peg
+
+@Wimp("Removes B instead of reporting E125001 for B/@")
+def remove_subdir_7_no_escape_peg(sbox):
+  "remove 'B/@' without pegrev escape"
+  do_remove(sbox, 'B/@', 'B/@') #, "svn: E125001: 'B/@'")
+
+#=====================================================================
 # Test for 'svn move' to a subdirectory
 
 @Wimp("Rename creates 'E/@tau@' instead of '@/@tau'")
@@ -560,6 +623,22 @@ test_list = [ None,
               remove_here_6_no_escape_peg,
               remove_here_7_no_escape_peg,
 
+              remove_subdir_1_escape_peg,
+              remove_subdir_2_escape_peg,
+              remove_subdir_3_escape_peg,
+              remove_subdir_4_escape_peg,
+              remove_subdir_5_escape_peg,
+              remove_subdir_6_escape_peg,
+              remove_subdir_7_escape_peg,
+
+              remove_subdir_1_no_escape_peg,
+              remove_subdir_2_no_escape_peg,
+              remove_subdir_3_no_escape_peg,
+              remove_subdir_4_no_escape_peg,
+              # skipped: remove_subdir_5_no_escape_peg,
+              # skipped: remove_subdir_6_no_escape_peg,
+              remove_subdir_7_no_escape_peg,
+
               rename_to_subdir_2_dst_escape_peg,
               rename_to_subdir_2_no_dst_escape_peg,
              ]