Fossil SCM

fossil-scm / test / th1-tcl2.txt
Source Blame History 19 lines
d8ed5a0… drh 1 <th1>
d8ed5a0… drh 2 #
d8ed5a0… drh 3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
d8ed5a0… drh 4 # The corresponding test file executes this file using the test-th-render
d8ed5a0… drh 5 # Fossil command.
d8ed5a0… drh 6 #
d8ed5a0… drh 7 # NOTE: This test requires that the SQLite package be available for the Tcl
d8ed5a0… drh 8 # interpreter that is linked to the Fossil executable.
d8ed5a0… drh 9 #
d8ed5a0… drh 10 tclInvoke set repository_name [repository 1]
d8ed5a0… drh 11 proc doOut {msg} {puts $msg; puts \n}
d8ed5a0… drh 12 doOut [tclEval {
d8ed5a0… drh 13 package require sqlite3
49c63f8… mistachkin 14 sqlite3 db $repository_name -readonly true
d8ed5a0… drh 15 set x [db eval {SELECT COUNT(*) FROM user;}]
d8ed5a0… drh 16 db close
d8ed5a0… drh 17 return $x
d8ed5a0… drh 18 }]
d8ed5a0… drh 19 </th1>

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button