Fossil SCM
New test case for the Markdown bug, fixed issues with hash matching, fixed tests for the TH1 unversioned command so they no longer depend on unversioned files from a past release in the real repository.
Commit
f92672bda33bf86752053272ef1f7aa9de088e823b9a864877042c2b8802800b
Parent
dd41f85acf57290…
1 file changed
+34
-31
+34
-31
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -852,11 +852,11 @@ | ||
| 852 | 852 | |
| 853 | 853 | run_in_checkout { |
| 854 | 854 | fossil test-th-eval --open-config "artifact tip" |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | -test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40}} $RESULT]} | |
| 857 | +test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]} | |
| 858 | 858 | |
| 859 | 859 | ############################################################################### |
| 860 | 860 | |
| 861 | 861 | fossil test-th-eval "artifact 0000000000" |
| 862 | 862 | test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}} |
| @@ -1504,10 +1504,23 @@ | ||
| 1504 | 1504 | </div> |
| 1505 | 1505 | }}} |
| 1506 | 1506 | |
| 1507 | 1507 | ############################################################################### |
| 1508 | 1508 | |
| 1509 | +# Verify that quoted delimiters like * and _ don't terminate their | |
| 1510 | +# span. This was fixed by checkin [dd41f85acf]. | |
| 1511 | +fossil test-th-eval {markdown "*This is\\*a test.*\n_second\\_test_"} | |
| 1512 | +test th1-markdown-6 {[normalize_result] eq {{} {<div class="markdown"> | |
| 1513 | + | |
| 1514 | +<p><em>This is*a test.</em> | |
| 1515 | +<em>second_test</em></p> | |
| 1516 | + | |
| 1517 | +</div> | |
| 1518 | +}}} | |
| 1519 | + | |
| 1520 | +############################################################################### | |
| 1521 | + | |
| 1509 | 1522 | fossil test-th-eval {encode64 test} |
| 1510 | 1523 | test th1-encode64-1 {$RESULT eq "dGVzdA=="} |
| 1511 | 1524 | |
| 1512 | 1525 | ############################################################################### |
| 1513 | 1526 | |
| @@ -1565,42 +1578,32 @@ | ||
| 1565 | 1578 | test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}} |
| 1566 | 1579 | file delete $th1FileName |
| 1567 | 1580 | |
| 1568 | 1581 | ############################################################################### |
| 1569 | 1582 | |
| 1570 | -# | |
| 1571 | -# TODO: Modify the result of this test if the list of unversioned files | |
| 1572 | -# changes. | |
| 1573 | -# | |
| 1574 | -run_in_checkout { | |
| 1575 | - fossil test-th-eval --open-config "unversioned list" | |
| 1576 | -} | |
| 1577 | - | |
| 1578 | -test th1-unversioned-1 {[normalize_result] eq \ | |
| 1579 | -{build-icons/linux.gif build-icons/linux64.gif build-icons/mac.gif\ | |
| 1580 | -build-icons/openbsd.gif build-icons/src.gif build-icons/win32.gif\ | |
| 1581 | -download.html download/fossil-linux-x86-1.32.zip\ | |
| 1582 | -download/fossil-linux-x86-1.33.zip download/fossil-linux-x86-1.34.zip\ | |
| 1583 | -download/fossil-linux-x86-1.35.zip download/fossil-macosx-x86-1.32.zip\ | |
| 1584 | -download/fossil-macosx-x86-1.33.zip download/fossil-macosx-x86-1.34.zip\ | |
| 1585 | -download/fossil-macosx-x86-1.35.zip download/fossil-openbsd-x86-1.32.zip\ | |
| 1586 | -download/fossil-openbsd-x86-1.33.zip download/fossil-openbsd-x86-1.34.tar.gz\ | |
| 1587 | -download/fossil-openbsd-x86-1.35.tar.gz download/fossil-src-1.32.tar.gz\ | |
| 1588 | -download/fossil-src-1.33.tar.gz download/fossil-src-1.34.tar.gz\ | |
| 1589 | -download/fossil-src-1.35.tar.gz download/fossil-w32-1.32.zip\ | |
| 1590 | -download/fossil-w32-1.33.zip download/fossil-w32-1.34.zip\ | |
| 1591 | -download/fossil-w32-1.35.zip download/releasenotes-1.32.html\ | |
| 1592 | -download/releasenotes-1.33.html download/releasenotes-1.34.html\ | |
| 1593 | -download/releasenotes-1.35.html index.wiki}} | |
| 1583 | +# Tests for the TH1 unversioned command require at least one | |
| 1584 | +# unversioned file in the repository. All tests run in a freshly | |
| 1585 | +# created checkout of a freshly created repo, so we can just | |
| 1586 | +# create a file or two for the purpose. | |
| 1587 | +write_file ten.txt "0123456789" | |
| 1588 | +fossil unversioned add ten.txt | |
| 1589 | +fossil unversioned list | |
| 1590 | + | |
| 1591 | +fossil test-th-eval --open-config "unversioned list" | |
| 1592 | +test th1-unversioned-1 {[normalize_result] eq {ten.txt}} | |
| 1593 | +fossil test-th-eval --open-config \ | |
| 1594 | + {string length [unversioned content ten.txt]} | |
| 1595 | +test th1-unversioned-2 {$RESULT eq {10}} | |
| 1596 | + | |
| 1594 | 1597 | |
| 1595 | 1598 | ############################################################################### |
| 1596 | 1599 | |
| 1597 | -run_in_checkout { | |
| 1598 | - fossil test-th-eval --open-config \ | |
| 1599 | - {string length [unversioned content build-icons/src.gif]} | |
| 1600 | -} | |
| 1601 | - | |
| 1602 | -test th1-unversioned-2 {$RESULT eq {4592}} | |
| 1600 | +#run_in_checkout { | |
| 1601 | +# fossil test-th-eval --open-config \ | |
| 1602 | +# {string length [unversioned content build-icons/src.gif]} | |
| 1603 | +#} | |
| 1604 | +# | |
| 1605 | +#test th1-unversioned-2 {$RESULT eq {4592}} | |
| 1603 | 1606 | |
| 1604 | 1607 | ############################################################################### |
| 1605 | 1608 | |
| 1606 | 1609 | test_cleanup |
| 1607 | 1610 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -852,11 +852,11 @@ | |
| 852 | |
| 853 | run_in_checkout { |
| 854 | fossil test-th-eval --open-config "artifact tip" |
| 855 | } |
| 856 | |
| 857 | test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40}} $RESULT]} |
| 858 | |
| 859 | ############################################################################### |
| 860 | |
| 861 | fossil test-th-eval "artifact 0000000000" |
| 862 | test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}} |
| @@ -1504,10 +1504,23 @@ | |
| 1504 | </div> |
| 1505 | }}} |
| 1506 | |
| 1507 | ############################################################################### |
| 1508 | |
| 1509 | fossil test-th-eval {encode64 test} |
| 1510 | test th1-encode64-1 {$RESULT eq "dGVzdA=="} |
| 1511 | |
| 1512 | ############################################################################### |
| 1513 | |
| @@ -1565,42 +1578,32 @@ | |
| 1565 | test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}} |
| 1566 | file delete $th1FileName |
| 1567 | |
| 1568 | ############################################################################### |
| 1569 | |
| 1570 | # |
| 1571 | # TODO: Modify the result of this test if the list of unversioned files |
| 1572 | # changes. |
| 1573 | # |
| 1574 | run_in_checkout { |
| 1575 | fossil test-th-eval --open-config "unversioned list" |
| 1576 | } |
| 1577 | |
| 1578 | test th1-unversioned-1 {[normalize_result] eq \ |
| 1579 | {build-icons/linux.gif build-icons/linux64.gif build-icons/mac.gif\ |
| 1580 | build-icons/openbsd.gif build-icons/src.gif build-icons/win32.gif\ |
| 1581 | download.html download/fossil-linux-x86-1.32.zip\ |
| 1582 | download/fossil-linux-x86-1.33.zip download/fossil-linux-x86-1.34.zip\ |
| 1583 | download/fossil-linux-x86-1.35.zip download/fossil-macosx-x86-1.32.zip\ |
| 1584 | download/fossil-macosx-x86-1.33.zip download/fossil-macosx-x86-1.34.zip\ |
| 1585 | download/fossil-macosx-x86-1.35.zip download/fossil-openbsd-x86-1.32.zip\ |
| 1586 | download/fossil-openbsd-x86-1.33.zip download/fossil-openbsd-x86-1.34.tar.gz\ |
| 1587 | download/fossil-openbsd-x86-1.35.tar.gz download/fossil-src-1.32.tar.gz\ |
| 1588 | download/fossil-src-1.33.tar.gz download/fossil-src-1.34.tar.gz\ |
| 1589 | download/fossil-src-1.35.tar.gz download/fossil-w32-1.32.zip\ |
| 1590 | download/fossil-w32-1.33.zip download/fossil-w32-1.34.zip\ |
| 1591 | download/fossil-w32-1.35.zip download/releasenotes-1.32.html\ |
| 1592 | download/releasenotes-1.33.html download/releasenotes-1.34.html\ |
| 1593 | download/releasenotes-1.35.html index.wiki}} |
| 1594 | |
| 1595 | ############################################################################### |
| 1596 | |
| 1597 | run_in_checkout { |
| 1598 | fossil test-th-eval --open-config \ |
| 1599 | {string length [unversioned content build-icons/src.gif]} |
| 1600 | } |
| 1601 | |
| 1602 | test th1-unversioned-2 {$RESULT eq {4592}} |
| 1603 | |
| 1604 | ############################################################################### |
| 1605 | |
| 1606 | test_cleanup |
| 1607 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -852,11 +852,11 @@ | |
| 852 | |
| 853 | run_in_checkout { |
| 854 | fossil test-th-eval --open-config "artifact tip" |
| 855 | } |
| 856 | |
| 857 | test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]} |
| 858 | |
| 859 | ############################################################################### |
| 860 | |
| 861 | fossil test-th-eval "artifact 0000000000" |
| 862 | test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}} |
| @@ -1504,10 +1504,23 @@ | |
| 1504 | </div> |
| 1505 | }}} |
| 1506 | |
| 1507 | ############################################################################### |
| 1508 | |
| 1509 | # Verify that quoted delimiters like * and _ don't terminate their |
| 1510 | # span. This was fixed by checkin [dd41f85acf]. |
| 1511 | fossil test-th-eval {markdown "*This is\\*a test.*\n_second\\_test_"} |
| 1512 | test th1-markdown-6 {[normalize_result] eq {{} {<div class="markdown"> |
| 1513 | |
| 1514 | <p><em>This is*a test.</em> |
| 1515 | <em>second_test</em></p> |
| 1516 | |
| 1517 | </div> |
| 1518 | }}} |
| 1519 | |
| 1520 | ############################################################################### |
| 1521 | |
| 1522 | fossil test-th-eval {encode64 test} |
| 1523 | test th1-encode64-1 {$RESULT eq "dGVzdA=="} |
| 1524 | |
| 1525 | ############################################################################### |
| 1526 | |
| @@ -1565,42 +1578,32 @@ | |
| 1578 | test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}} |
| 1579 | file delete $th1FileName |
| 1580 | |
| 1581 | ############################################################################### |
| 1582 | |
| 1583 | # Tests for the TH1 unversioned command require at least one |
| 1584 | # unversioned file in the repository. All tests run in a freshly |
| 1585 | # created checkout of a freshly created repo, so we can just |
| 1586 | # create a file or two for the purpose. |
| 1587 | write_file ten.txt "0123456789" |
| 1588 | fossil unversioned add ten.txt |
| 1589 | fossil unversioned list |
| 1590 | |
| 1591 | fossil test-th-eval --open-config "unversioned list" |
| 1592 | test th1-unversioned-1 {[normalize_result] eq {ten.txt}} |
| 1593 | fossil test-th-eval --open-config \ |
| 1594 | {string length [unversioned content ten.txt]} |
| 1595 | test th1-unversioned-2 {$RESULT eq {10}} |
| 1596 | |
| 1597 | |
| 1598 | ############################################################################### |
| 1599 | |
| 1600 | #run_in_checkout { |
| 1601 | # fossil test-th-eval --open-config \ |
| 1602 | # {string length [unversioned content build-icons/src.gif]} |
| 1603 | #} |
| 1604 | # |
| 1605 | #test th1-unversioned-2 {$RESULT eq {4592}} |
| 1606 | |
| 1607 | ############################################################################### |
| 1608 | |
| 1609 | test_cleanup |
| 1610 |