We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54f8e10 commit 26eba5fCopy full SHA for 26eba5f
test/unit/get_shortest_hash.cmake
@@ -53,6 +53,11 @@ cpm_get_shortest_hash(${tmp} "cccb77be9609d2768ed80dd42cec54f77b1f1456" hash)
53
assert_equal(${hash} "cccb77be")
54
assert_contents_equal(${tmp}/cccb77be.hash cccb77be9609d2768ed80dd42cec54f77b1f1456)
55
56
+# check that legacy hashs are recognized
57
+file(MAKE_DIRECTORY "${tmp}/cccb77be9609d2768ed80dd42cec54f77b1f1457")
58
+cpm_get_shortest_hash(${tmp} "cccb77be9609d2768ed80dd42cec54f77b1f1457" hash)
59
+assert_equal(${hash} "cccb77be9609d2768ed80dd42cec54f77b1f1457")
60
+
61
# 1. The old file should still exist, and have the same content
62
assert_contents_equal(${tmp}/cccb.hash cccb77ae9609d2768ed80dd42cec54f77b1f1455)
63
assert_contents_equal(${tmp}/cccb77ae.hash cccb77ae9609d2768ed80dd42cec54f77b1f1456)
0 commit comments