Fossil

Check-in [f92672bd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:f92672bda33bf86752053272ef1f7aa9de088e823b9a864877042c2b8802800b
User & Date: rberteig 2017-03-14 20:21:10
Context
2017-03-14
21:15
Update hash regexp to defend against full length SHA3 hashes. check-in: 38115a0b user: rberteig tags: trunk
20:21
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. check-in: f92672bd user: rberteig tags: trunk
16:02
Fix by Natacha Port√© for delimiter escape bug discovered by Mark Janssen. (fossil-users list) check-in: dd41f85a user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/th1.test.

850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
....
1502
1503
1504
1505
1506
1507
1508













1509
1510
1511
1512
1513
1514
1515
....
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572




1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594

1595
1596
1597
1598
1599
1600

1601
1602
1603
1604
1605
1606

###############################################################################

run_in_checkout {
  fossil test-th-eval --open-config "artifact tip"
}

test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40}} $RESULT]}

###############################################################################

fossil test-th-eval "artifact 0000000000"
test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################
................................................................................
<p>Text can show <em>emphasis</em> or <em>emphasis</em> or <strong>strong emphassis</strong>.</p>

</div>
}}}

###############################################################################














fossil test-th-eval {encode64 test}
test th1-encode64-1 {$RESULT eq "dGVzdA=="}

###############################################################################

fossil test-th-eval {encode64 test\x00}
test th1-encode64-2 {$RESULT eq "dGVzdAA="}
................................................................................

fossil test-th-source $th1FileName
test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}}
file delete $th1FileName

###############################################################################

#
# TODO: Modify the result of this test if the list of unversioned files
#       changes.




#
run_in_checkout {
  fossil test-th-eval --open-config "unversioned list"
}

test th1-unversioned-1 {[normalize_result] eq \
{build-icons/linux.gif build-icons/linux64.gif build-icons/mac.gif\
build-icons/openbsd.gif build-icons/src.gif build-icons/win32.gif\
download.html download/fossil-linux-x86-1.32.zip\
download/fossil-linux-x86-1.33.zip download/fossil-linux-x86-1.34.zip\
download/fossil-linux-x86-1.35.zip download/fossil-macosx-x86-1.32.zip\
download/fossil-macosx-x86-1.33.zip download/fossil-macosx-x86-1.34.zip\
download/fossil-macosx-x86-1.35.zip download/fossil-openbsd-x86-1.32.zip\
download/fossil-openbsd-x86-1.33.zip download/fossil-openbsd-x86-1.34.tar.gz\
download/fossil-openbsd-x86-1.35.tar.gz download/fossil-src-1.32.tar.gz\
download/fossil-src-1.33.tar.gz download/fossil-src-1.34.tar.gz\
download/fossil-src-1.35.tar.gz download/fossil-w32-1.32.zip\
download/fossil-w32-1.33.zip download/fossil-w32-1.34.zip\
download/fossil-w32-1.35.zip download/releasenotes-1.32.html\
download/releasenotes-1.33.html download/releasenotes-1.34.html\
download/releasenotes-1.35.html index.wiki}}


###############################################################################

run_in_checkout {
  fossil test-th-eval --open-config \
      {string length [unversioned content build-icons/src.gif]}
}


test th1-unversioned-2 {$RESULT eq {4592}}

###############################################################################

test_cleanup







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|
|
>
>
>
>
|
<
|
<
<
|
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<

>


|
|
|
<
>
|
|




850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
....
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
....
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590

1591


1592

1593
1594
1595











1596
1597
1598
1599
1600
1601
1602

1603
1604
1605
1606
1607
1608
1609

###############################################################################

run_in_checkout {
  fossil test-th-eval --open-config "artifact tip"
}

test th1-artifact-3 {[regexp -- {F test/th1\.test [0-9a-f]{40,64}} $RESULT]}

###############################################################################

fossil test-th-eval "artifact 0000000000"
test th1-artifact-4 {$RESULT eq {TH_ERROR: repository unavailable}}

###############################################################################
................................................................................
<p>Text can show <em>emphasis</em> or <em>emphasis</em> or <strong>strong emphassis</strong>.</p>

</div>
}}}

###############################################################################

# Verify that quoted delimiters like * and _ don't terminate their
# span. This was fixed by checkin [dd41f85acf].
fossil test-th-eval {markdown "*This is\\*a test.*\n_second\\_test_"}
test th1-markdown-6 {[normalize_result] eq {{} {<div class="markdown">

<p><em>This is*a test.</em>
<em>second_test</em></p>

</div>
}}}

###############################################################################

fossil test-th-eval {encode64 test}
test th1-encode64-1 {$RESULT eq "dGVzdA=="}

###############################################################################

fossil test-th-eval {encode64 test\x00}
test th1-encode64-2 {$RESULT eq "dGVzdAA="}
................................................................................

fossil test-th-source $th1FileName
test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}}
file delete $th1FileName

###############################################################################

# Tests for the TH1 unversioned command require at least one
# unversioned file in the repository. All tests run in a freshly 
# created checkout of a freshly created repo, so we can just
# create a file or two for the purpose.
write_file ten.txt "0123456789"
fossil unversioned add ten.txt
fossil unversioned list


fossil test-th-eval --open-config "unversioned list"


test th1-unversioned-1 {[normalize_result] eq {ten.txt}}

fossil test-th-eval --open-config \
      {string length [unversioned content ten.txt]}
test th1-unversioned-2 {$RESULT eq {10}}













###############################################################################

#run_in_checkout {
#  fossil test-th-eval --open-config \
#      {string length [unversioned content build-icons/src.gif]}

#}
#
#test th1-unversioned-2 {$RESULT eq {4592}}

###############################################################################

test_cleanup