[PATCH 5 of 5] findrenames: Update test suite to handle new similarity percentages
David Greenaway
hg-dev at davidgreenaway.com
Sat Mar 6 22:12:52 CST 2010
# HG changeset patch
# User David Greenaway <hg-dev at davidgreenaway.com>
# Date 1267934964 -39600
# Node ID 7ada26c68e08e8c5ac500a26f731ab80a13c3628
# Parent 5f79abbdc9e74816cb64ecdf37a774b11474a6e9
findrenames: Update test suite to handle new similarity percentages.
diff --git a/tests/test-addremove-similar.out b/tests/test-addremove-similar.out
--- a/tests/test-addremove-similar.out
+++ b/tests/test-addremove-similar.out
@@ -8,12 +8,13 @@
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
adding another-empty-file
removing empty-file
+recording removal of empty-file as rename to another-empty-file (100% similar)
adding large-file
adding tiny-file
removing large-file
adding small-file
removing tiny-file
-recording removal of tiny-file as rename to small-file (82% similar)
+recording removal of tiny-file as rename to small-file (66% similar)
% should all fail
abort: similarity must be a number
abort: similarity must be between 0 and 100
diff --git a/tests/test-import b/tests/test-import
--- a/tests/test-import
+++ b/tests/test-import
@@ -299,7 +299,7 @@
echo '% test import with similarity (issue295)'
hg init sim
cd sim
-echo 'this is a test' > a
+echo 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In venenatis aliquet.' > a
hg ci -Ama
cat > ../rename.diff <<EOF
diff --git a/a b/a
@@ -307,13 +307,13 @@
--- a/a
+++ /dev/null
@@ -1,1 +0,0 @@
--this is a test
+-Lorem ipsum dolor sit amet, consectetur adipiscing elit. In venenatis aliquet.
diff --git a/b b/b
new file mode 100644
--- /dev/null
+++ b/b
@@ -0,0 +1,2 @@
-+this is a test
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. In venenatis aliquet.
+foo
EOF
hg import --no-commit -v -s 1 ../rename.diff
diff --git a/tests/test-import.out b/tests/test-import.out
--- a/tests/test-import.out
+++ b/tests/test-import.out
@@ -286,7 +286,7 @@
patching file b
removing a
adding b
-recording removal of a as rename to b (88% similar)
+recording removal of a as rename to b (99% similar)
A b
a
R a
More information about the Mercurial-devel
mailing list