File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 3636
3737 - run : opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip
3838
39- - run : opam exec -- dune build @src/runtest @examples/runtest @tests/runtest
39+ - run : opam exec -- dune build @src/runtest @examples/runtest @tests/runtest -p tiny_httpd
40+ if : ${{ matrix.os == 'ubuntu-latest' }}
41+
42+ - run : opam install tiny_httpd
43+
44+ - run : opam exec -- dune build @src/runtest @examples/runtest @tests/runtest -p tiny_httpd_camlzip
4045 if : ${{ matrix.os == 'ubuntu-latest' }}
Original file line number Diff line number Diff line change 3636 (targets vfs.ml)
3737 (deps (source_tree files) (:out test_output.txt.expected))
3838 (enabled_if (= %{system} "linux"))
39- (action (run ../src/ bin/vfs_pack.exe -o %{targets}
39+ (action (run %{ bin:tiny-httpd-vfs-pack} -o %{targets}
4040 --mirror=files/
4141 --file=test_out.txt,%{out}
4242 --url=example_dot_com,http://example.com)))
4343
4444(rule
4545 (targets vfs.ml)
4646 (enabled_if (<> %{system} "linux"))
47+ (package tiny_httpd)
4748 (action
4849 (with-stdout-to
4950 %{targets}
Original file line number Diff line number Diff line change 11open Tiny_httpd_html
22let spf = Printf. sprintf
33
4+ let list_init n f =
5+ let rec loop i =
6+ if i= n then []
7+ else f i :: loop (i+ 1 )
8+ in loop 0
9+
410let t1() =
511 html [] [
612 head [] [];
713 body [] [
814 ul [A. style " list-style: circle" ] (
915 li[] [pre [] [txt " a" ; pre[][txt " c" ; txt" d" ]; txt " b" ]] ::
10- List. init 100 (fun i -> li [A. id (spf " l%d" i)] [txt (spf " item %d" i)])
16+ list_init 100 (fun i -> li [A. id (spf " l%d" i)] [txt (spf " item %d" i)])
1117 )
1218 ]
1319 ]
@@ -19,7 +25,7 @@ let t2() =
1925 pre [] [txt " a" ; txt " b" ];
2026 body [] [
2127 ul' [A. style " list-style: circle" ] [
22- sub_l @@ List. init 100 @@ fun i ->
28+ sub_l @@ list_init 100 @@ fun i ->
2329 li ~if_: (i<> 42 ) [A. id (spf " l%d" i)] [txt (spf " item %d" i)]
2430 ]
2531 ]
You can’t perform that action at this time.
0 commit comments