on master help sign in
Read my-app's sources on the test desk instead of copies
8125287Claude
README.md+3−3
@@ -10,7 +10,7 @@ Milestone 1 of the doc's eight, the parser and the `%jibb` mark, is done; milest
10- `jibb/`: the `%jibb` desk, for the shared host (milestone 4).
10- `jibb/`: the `%jibb` desk, for the shared host (milestone 4).
11- `my-app/`: an example app desk built from the doc's worked examples.
11- `my-app/`: an example app desk built from the doc's worked examples.
12- `vendor/`: pinned copies of the base-dev and landscape files the desks need.
12- `vendor/`: pinned copies of the base-dev and landscape files the desks need.
13−- `tests/`: golden cases in `golden/<case>/`, test suites in `lib/` and their fixtures, for `tools/test-arms` and the ship's `-test` thread, and `my-app-copies.txt`, the list of fixtures copied from `my-app/`. `lib/jibb.hoon`, which runs the golden cases on the ship, is generated.
13+- `tests/`: golden cases in `golden/<case>/`, test suites in `lib/` and their fixtures, for `tools/test-arms` and the ship's `-test` thread, and `my-app-copies.txt`, the list of fixtures that copy `my-app/mar/label.hoon`. `lib/jibb.hoon`, which runs the golden cases on the ship, is generated.
14- `tools/`: dev tooling: `golden`, `test-arms`, `hoon` and `doc-blocks`, with their self-test in `testdata/`, `ship`, and `check`, which runs every check.
14- `tools/`: dev tooling: `golden`, `test-arms`, `hoon` and `doc-blocks`, with their self-test in `testdata/`, `ship`, and `check`, which runs every check.
15- `docs/`: the doc's tabs as Markdown in `spec/`, the status, the open questions, the development guide, the compiler's map, and briefs for milestones in `prompts/`.
15- `docs/`: the doc's tabs as Markdown in `spec/`, the status, the open questions, the development guide, the compiler's map, and briefs for milestones in `prompts/`.
16
16
@@ -90,7 +90,7 @@ Many suites share one eval, so the library is built once per eval, not once per
90
90
91A golden-report suite has a `report` arm and a `/*` file bound to the face `expected`; when one of its arms fails, the runner prints a diff between that file and the report. Before any eval, the runner checks the golden files of the suites it runs, the `%txt` files bound to a face containing `expected`: each must end in exactly one newline, which an arm can't see in the file's wain, and hold no line that starts `BAD ` or ends `: BAD`. `--update` won't write a report that breaks either rule.
91A golden-report suite has a `report` arm and a `/*` file bound to the face `expected`; when one of its arms fails, the runner prints a diff between that file and the report. Before any eval, the runner checks the golden files of the suites it runs, the `%txt` files bound to a face containing `expected`: each must end in exactly one newline, which an arm can't see in the file's wain, and hold no line that starts `BAD ` or ends `: BAD`. `--update` won't write a report that breaks either rule.
92
92
93−Some fixtures in `tests/` are byte copies of `my-app` files, because the `jibb-dev` desk has no `my-app`. `tests/my-app-copies.txt` lists each copy with its source; a copy may leave out one line of its source, such as a mark's `/-` import. `tools/test-arms` checks every pair when it runs with no suite or shard named, and with `--copies`, which `tools/check` runs as `my-app-copies`. The suites below that check byte-identical `my-app` files read these copies.
93+The `jibb-dev` desk holds `my-app`'s sources under `/my-app`, without its desk files, so the suites below that check `my-app` files read them there, and a golden case that uses one links to it: `tests/golden/doc-overview-02-theme/source.jibb` is a symlink to `my-app/ui/theme.jibb`. The fixtures that copy `my-app/mar/label.hoon` leave out its first line, a comment; `tests/my-app-copies.txt` lists them, and `tools/test-arms` checks every pair when it runs with no suite or shard named, and with `--copies`, which `tools/check` runs as `my-app-copies`.
94
94
95`tools/test-arms --list` lists every suite, and [The test suites](docs/development.md#the-test-suites) in the development guide says what each one checks. Each suite it lists runs under eval and on the fake ship, with the same fixtures. The `jibb-import` suite compares the partial Hoon importer's fixture projections against their golden file. The suites `jibb-bridge`, `jibb-import-overlap`, `jibb-import-structural`, `jibb-union-source`, `jibb-union-alias-overlap`, `jibb-full-overlap-basic`, `jibb-full-overlap-graph`, `jibb-generic-recursion`, `jibb-generic-construction`, `jibb-generic-pattern`, `jibb-deferred`, `jibb-deferred-prepared`, `jibb-deferred-resolver`, `jibb-deferred-context`, `jibb-empty`, `jibb-cell-branch`, `jibb-tlon-bridge`, `jibb-mark-bridge`, `jibb-poke-bridge` and `jibb-api-paths` check importer/checker, prelude and partial API path analysis boundaries.
95`tools/test-arms --list` lists every suite, and [The test suites](docs/development.md#the-test-suites) in the development guide says what each one checks. Each suite it lists runs under eval and on the fake ship, with the same fixtures. The `jibb-import` suite compares the partial Hoon importer's fixture projections against their golden file. The suites `jibb-bridge`, `jibb-import-overlap`, `jibb-import-structural`, `jibb-union-source`, `jibb-union-alias-overlap`, `jibb-full-overlap-basic`, `jibb-full-overlap-graph`, `jibb-generic-recursion`, `jibb-generic-construction`, `jibb-generic-pattern`, `jibb-deferred`, `jibb-deferred-prepared`, `jibb-deferred-resolver`, `jibb-deferred-context`, `jibb-empty`, `jibb-cell-branch`, `jibb-tlon-bridge`, `jibb-mark-bridge`, `jibb-poke-bridge` and `jibb-api-paths` check importer/checker, prelude and partial API path analysis boundaries.
96
96
@@ -129,7 +129,7 @@ tools/ship stop
129| `jibb` | `vendor/*`, then `jibb` |
129| `jibb` | `vendor/*`, then `jibb` |
130| `jibb-dev` | `vendor/*`, then `jibb-dev`, then `tests/`, with `tests/lib/jibb.hoon` generated, and `jibb/sys.kelvin` |
130| `jibb-dev` | `vendor/*`, then `jibb-dev`, then `tests/`, with `tests/lib/jibb.hoon` generated, and `jibb/sys.kelvin` |
131
131
132−The `jibb-dev` desk runs the golden cases on the ship, as `-test` arms. `tools/ship gen-tests` writes `tests/lib/jibb.hoon` from `tests/golden`: for each case it imports `source.jibb`, `tokens.txt` and `tree.txt` with `/*`, and its `test-` arm compares `golden:jibb` with them. Cases opted into `types.txt` also compare the partial inference output. The file is generated, not committed (review question 32): desk assembly writes it afresh, and `.gitignore` lists it. `tools/ship test` regenerates it, syncs the desk and runs `-test /=jibb-dev=/tests`, printing each case's OK, FAILED or CRASHED and the reason. It exits 0 only when every case passes.
132+The `jibb-dev` desk runs the golden cases on the ship, as `-test` arms. `tools/ship gen-tests` writes `tests/lib/jibb.hoon` from `tests/golden`: for each case it imports `source.jibb`, `tokens.txt` and `tree.txt` with `/*`, reading a `source.jibb` that links to a `my-app` file from `/my-app`, and its `test-` arm compares `golden:jibb` with them. Cases opted into `types.txt` also compare the partial inference output. The file is generated, not committed (review question 32): desk assembly writes it afresh, and `.gitignore` lists it. `tools/ship test` regenerates it, syncs the desk and runs `-test /=jibb-dev=/tests`, printing each case's OK, FAILED or CRASHED and the reason. It exits 0 only when every case passes.
133
133
134```
134```
135tools/ship test # the library and tests/golden
135tools/ship test # the library and tests/golden
docs/development.md+2−2
@@ -89,7 +89,7 @@ Each file in `tests/lib` is a suite: a core of `test-` arms, with the libraries
89
89
90A golden-report suite has a `report` arm and a golden file bound to the face `expected`; its test arm compares the report with that file, and `tools/test-arms --list` marks it `, report`. `tools/test-arms --report <suite>` prints the report, and `tools/test-arms --update <suite>` writes it to the file; with no suite named, `--update` writes every golden-report suite's. When such a suite's arm fails, `tools/test-arms` prints a unified diff between the file and the report. `jibb-buttons` and `jibb-deferred-prepared` have golden files too, but compare them inside helpers over several cases and have no `report` arm. Every golden file, a `/*` `%txt` file bound to a face containing `expected`, must end in exactly one newline (a suite compares `wain`s, which can't show a missing one) and hold no line that starts `BAD ` or ends `: BAD`; `tools/test-arms` checks that before any eval, and `--update` won't write a report that breaks it.
90A golden-report suite has a `report` arm and a golden file bound to the face `expected`; its test arm compares the report with that file, and `tools/test-arms --list` marks it `, report`. `tools/test-arms --report <suite>` prints the report, and `tools/test-arms --update <suite>` writes it to the file; with no suite named, `--update` writes every golden-report suite's. When such a suite's arm fails, `tools/test-arms` prints a unified diff between the file and the report. `jibb-buttons` and `jibb-deferred-prepared` have golden files too, but compare them inside helpers over several cases and have no `report` arm. Every golden file, a `/*` `%txt` file bound to a face containing `expected`, must end in exactly one newline (a suite compares `wain`s, which can't show a missing one) and hold no line that starts `BAD ` or ends `: BAD`; `tools/test-arms` checks that before any eval, and `--update` won't write a report that breaks it.
91
91
92−The `jibb-dev` desk has no `my-app`, so the suites that check `my-app` files read byte copies of them kept under `tests/`, as do some golden cases. `tests/my-app-copies.txt` lists every such copy, one per line, as `COPY SOURCE`, or `COPY SOURCE without LINE` for a copy that leaves out one line of its source, such as `/- blog`. `tools/test-arms` checks every pair when run with no suite or shard named, and `tools/test-arms --copies`, the `my-app-copies` check, checks only them. Where the table below calls a `my-app` file byte-identical or unchanged, it is one of these copies.
92+The `jibb-dev` desk holds `my-app`'s `ui/`, `sur/` and `mar/` under `/my-app` (review question 31), so the suites that check `my-app` files bind them there, as `/* sur %txt /my-app/sur/todo/hoon`, and keep no copies. A mark's `/-` line is Ford's, which `ride` can't parse, so the suites that ride a mark drop it with their `+mark-text` arm. Where the table below calls a `my-app` file byte-identical or unchanged, the suite reads that file itself. The fixtures that copy `my-app/mar/label.hoon` leave out its first line, a comment; `tests/my-app-copies.txt` lists them, one per line, as `COPY SOURCE without LINE`. `tools/test-arms` checks every pair when run with no suite or shard named, and `tools/test-arms --copies`, the `my-app-copies` check, checks only them.
93
93
94| Suite | What it checks | Golden files |
94| Suite | What it checks | Golden files |
95| --- | --- | --- |
95| --- | --- | --- |
@@ -174,7 +174,7 @@ CI, [.github/workflows/check.yml](../.github/workflows/check.yml), builds the de
174
174
175A case is a folder `tests/golden/<name>/` holding:
175A case is a folder `tests/golden/<name>/` holding:
176
176
177−- `source.jibb`, the input, ending in one newline;
177+- `source.jibb`, the input, ending in one newline. A case whose input is a `my-app` file, such as a doc block that `my-app` holds, makes it a symlink to that file; desk assembly leaves the link out, and `tools/ship gen-tests` reads the file from `/my-app`. A file under `modules/` may link to `my-app` the same way;
178- `about.txt`: a `source:` line with the doc's words or block it comes from, a `tests:` line saying what it exercises, and an `expect:` line, either `parses` or `error at <line>:<col>` and why (one case, `inline-leftout-signed-float-auras`, says `unclear`: see grammar question 13 in [open-questions.md](open-questions.md));
178- `about.txt`: a `source:` line with the doc's words or block it comes from, a `tests:` line saying what it exercises, and an `expect:` line, either `parses` or `error at <line>:<col>` and why (one case, `inline-leftout-signed-float-auras`, says `unclear`: see grammar question 13 in [open-questions.md](open-questions.md));
179- the expected outputs, `tokens.txt` and `tree.txt`, each the output plus one newline.
179- the expected outputs, `tokens.txt` and `tree.txt`, each the output plus one newline.
180- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
180- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
docs/status.md+1−1
@@ -253,7 +253,7 @@ On a machine set up as [development.md](development.md) says:
253tools/golden # 660 cases under urbit eval
253tools/golden # 660 cases under urbit eval
254tools/test-arms # the my-app copies, then every tests/lib suite under urbit eval
254tools/test-arms # the my-app copies, then every tests/lib suite under urbit eval
255tools/test-arms --list # the suites and their arms; ", report" marks a golden report
255tools/test-arms --list # the suites and their arms; ", report" marks a golden report
256−tools/test-arms --copies # the tests/ copies of my-app files in tests/my-app-copies.txt match my-app
256+tools/test-arms --copies # the copies of my-app/mar/label.hoon in tests/my-app-copies.txt match it
257tools/test-arms --report jibb-import # print a golden-report suite's report
257tools/test-arms --report jibb-import # print a golden-report suite's report
258tools/test-arms --update jibb-import # write it to the suite's expected file
258tools/test-arms --update jibb-import # write it to the suite's expected file
259tools/test-arms jibb-import # the Hoon importer fixture projection
259tools/test-arms jibb-import # the Hoon importer fixture projection
tests/golden/doc-grammar-02-buttons/source.jibbmode 100644 → 120000+1−7
@@ -1,7 +0,0 @@
1−:: /ui/components/buttons.jibb, a library with no main
2−++ add-button |= label=@t
3− button label %add :: error: nothing fixes the union of %add
4−++ labelled |= [label=@t msg=M]
5− button label msg :: fine: the caller's union
6−++ wide ^- (list attr)
7− ~[width+[%fill 1] pad+%s2] :: fine: the cast fixes the tags
@@ -0,0 +1 @@
1+../../../my-app/ui/components/buttons.jibb
tests/golden/doc-grammar-06-cart-store/source.jibbmode 100644 → 120000+1−12
@@ -1,12 +0,0 @@
1−:: /ui/stores/cart.jibb
2−+$ state [items=(list @t) open=?]
3−+$ poke
4− [%add item=@t]
5− %toggle
6−
7−++ main (store init update)
8−++ init ^- state [~ %.n]
9−++ update |= [a=poke s=state]
10− ?- a
11− [%add item] s(items=[item items.s])
12− %toggle s(open=(not open.s))
@@ -0,0 +1 @@
1+../../../my-app/ui/stores/cart.jibb
tests/golden/doc-grammar-07-basket/source.jibbmode 100644 → 120000+1−32
@@ -1,32 +0,0 @@
1−:: /ui/basket.jibb
2−/= cart /ui/stores/cart
3−
4−++ main (program init update view subs)
5−
6−+$ model [cart=state.cart note=@t]
7−+$ msg
8− [%noted text=@t]
9− %add
10− %toggle
11− [%got cart=state.cart]
12− [%acked err=(unit @t)]
13−
14−++ init |= ~
15− [[~ %.n] ""]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%noted t] [m(note=t) ~]
20− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
21− %toggle [m ~[(poke.cart %toggle |=%acked)]]
22− [%got c] [m(cart=c) ~]
23− [%acked err] [m ~]
24−
25−++ subs |= m=model
26− ~[[%watch (state.cart |=%got)]]
27−
28−++ view |= m=model
29− column ~[gap+%s1] ~[
30− (text "{(lent items.cart.m)} items")
31− field "Item" note.m |=%noted
32− button "Add" %add
@@ -0,0 +1 @@
1+../../../my-app/ui/basket.jibb
tests/golden/doc-overview-02-theme/source.jibbmode 100644 → 120000+1−8
@@ -1,8 +0,0 @@
1−++ theme ^- theme
2− [ space=[s1="4px" s2="8px" s3="16px"]
3− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
4− wide="60rem"
5− lang="en"
6− zone="UTC"
7− font=`%/static/fonts/inter.woff2
8− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
@@ -0,0 +1 @@
1+../../../my-app/ui/theme.jibb
tests/golden/doc-overview-04-todo-api/source.jibbmode 100644 → 120000+1−13
@@ -1,13 +0,0 @@
1−:: /ui/api/todo.jibb
2−/- todo
3−/% %todo-action
4−/% %todos
5−/% %todo-update
6−/% %todo-item
7−
8−+$ item item.todo
9−+$ poke todo-action
10−+$ paths
11− [%todos /todos todos]
12− [%changes /changes (facts todos todo-update)]
13− [%todo-by-id /todo/[id=@ud] todo-item]
@@ -0,0 +1 @@
1+../../../my-app/ui/api/todo.jibb
tests/golden/doc-overview-08-about/source.jibbmode 100644 → 120000+1−7
@@ -1,7 +0,0 @@
1−++ main view
2−
3−++ view
4− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
5− heading 1 "About this ship"
6− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
7− el ~[tone+%accent] (link %/blog "Read the blog")
@@ -0,0 +1 @@
1+../../../my-app/ui/about.jibb
tests/golden/doc-overview-09-blog-index/source.jibbmode 100644 → 120000+1−9
@@ -1,9 +0,0 @@
1−/- blog
2−/= api /ui/api/blog
3−/= card /ui/components/card
4−
5−++ main (page load view)
6−++ load |=(~ (posts.api same))
7−
8−++ view |= ps=(list post.blog)
9− column ~[gap+%s2] (turn ps card.card)
@@ -0,0 +1 @@
1+../../../my-app/ui/blog/index.jibb
tests/golden/doc-overview-10-todo-list/source.jibbmode 100644 → 120000+1−40
@@ -1,40 +0,0 @@
1−/= todo /ui/api/todo
2−
3−++ main (program init update view subs)
4−
5−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
6−+$ msg
7− [%typed text=@t]
8− %submit
9− [%toggled id=@ud]
10− [%got todos=(list item.todo)]
11− [%acked err=(unit @t)]
12−
13−++ init |= ts=(list item.todo)
14− [ts "" ~]
15−
16−++ update |= [=msg m=model]
17− ?- msg
18− [%typed t]
19− ?- (gth (lent (tuba (trip t))) 80)
20− %.y [m(draft=t error=`"Too long") ~]
21− %.n [m(draft=t error=~) ~]
22− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
23− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
24− [%got ts] [m(todos=ts) ~]
25− [%acked err] [m(error=err) ~]
26−
27−++ subs |= m=model
28− ~[[%watch (todos.todo |=%got)]]
29−
30−++ view |= m=model
31− column ~[gap+%s2] ~[
32− heading 2 "Todos"
33− each (turn todos.m row-of)
34− row ~[gap+%s1] ~[
35− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
36− button "Add" %submit
37− el ~[tone+%danger] (text (fall error.m ""))
38−
39−++ row-of |= t=item.todo
40− [id.t (toggle done.t text.t [%toggled id.t])]
@@ -0,0 +1 @@
1+../../../my-app/ui/todo-list.jibb
tests/golden/doc-overview-11-index/source.jibbmode 100644 → 120000+1−10
@@ -1,10 +0,0 @@
1−/= todo /ui/api/todo
2−/= todo-list /ui/todo-list
3−
4−++ main (page load view)
5−++ load |=(~ (todos.todo same))
6−
7−++ view |= ts=(list item.todo)
8− column ~[pad+%s3] ~[
9− heading 1 "My ship"
10− island main.todo-list ts
@@ -0,0 +1 @@
1+../../../my-app/ui/index.jibb
tests/golden/fixture-blog-api/source.jibbmode 100644 → 120000+1−5
@@ -1,5 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−/% %posts
3−
4−+$ paths
5− [%posts /posts posts]
@@ -0,0 +1 @@
1+../../../my-app/ui/api/blog.jibb
tests/golden/fixture-blog-card/source.jibbmode 100644 → 120000+1−5
@@ -1,5 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−/- blog
3−
4−++ card |= p=post.blog
5− text title.p
@@ -0,0 +1 @@
1+../../../my-app/ui/components/card.jibb
tests/golden/types-module-fixtures/modules/ui/api/blog.jibbmode 100644 → 120000+1−5
@@ -1,5 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−/% %posts
3−
4−+$ paths
5− [%posts /posts posts]
@@ -0,0 +1 @@
1+../../../../../../my-app/ui/api/blog.jibb
tests/golden/types-module-fixtures/modules/ui/components/card.jibbmode 100644 → 120000+1−5
@@ -1,5 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−/- blog
3−
4−++ card |= p=post.blog
5− text title.p
@@ -0,0 +1 @@
1+../../../../../../my-app/ui/components/card.jibb
tests/golden/types-module-fixtures/source.jibbmode 100644 → 120000+1−9
@@ -1,9 +0,0 @@
1−/- blog
2−/= api /ui/api/blog
3−/= card /ui/components/card
4−
5−++ main (page load view)
6−++ load |=(~ (posts.api same))
7−
8−++ view |= ps=(list post.blog)
9− column ~[gap+%s2] (turn ps card.card)
@@ -0,0 +1 @@
1+../../../my-app/ui/blog/index.jibb
tests/lib/jibb-api-evidence.hoon+12−6
@@ -2,17 +2,23 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10/* api %txt /tests/type-api-paths/scry/txt
10/* api %txt /tests/type-api-paths/scry/txt
11|%
11|%
12++ text
12++ text
13 |= lines=wain
13 |= lines=wain
14 ^- @t
14 ^- @t
15 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
15 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
16+:: A mark's text without its /- lines, which Ford resolves and ride
17+:: can't parse.
18+++ mark-text
19+ |= lines=wain
20+ ^- @t
21+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
16++ synthetic-evidence-status
22++ synthetic-evidence-status
17 ^- @t
23 ^- @t
18 :: A deliberately partial prelude preserves names even when inference fails.
24 :: A deliberately partial prelude preserves names even when inference fails.
@@ -252,7 +258,7 @@
252 ?~ update ~[leaf+"API evidence fixture update is missing"]
258 ?~ update ~[leaf+"API evidence fixture update is missing"]
253 ?~ item ~[leaf+"API evidence fixture item is missing"]
259 ?~ item ~[leaf+"API evidence fixture item is missing"]
254 ?~ api ~[leaf+"API evidence fixture api is missing"]
260 ?~ api ~[leaf+"API evidence fixture api is missing"]
255− =/ outcome=@t (real-evidence-status prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api))
261+ =/ outcome=@t (real-evidence-status prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api))
256 ?: =(outcome 'real todo path evidence passed') ~
262 ?: =(outcome 'real todo path evidence passed') ~
257 ~[leaf+(trip outcome)]
263 ~[leaf+(trip outcome)]
258--
264--
tests/lib/jibb-api-paths.hoon+13−7
@@ -2,12 +2,12 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* api %txt /tests/type-api-paths/api/txt
10+/* api %txt /my-app/ui/api/todo/jibb
11/* missing-decl %txt /tests/type-api-paths/missing-decl/txt
11/* missing-decl %txt /tests/type-api-paths/missing-decl/txt
12/* value-clash %txt /tests/type-api-paths/value-clash/txt
12/* value-clash %txt /tests/type-api-paths/value-clash/txt
13/* poke-clash %txt /tests/type-api-paths/poke-clash/txt
13/* poke-clash %txt /tests/type-api-paths/poke-clash/txt
@@ -19,9 +19,15 @@
19 |= lines=wain
19 |= lines=wain
20 ^- @t
20 ^- @t
21 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
21 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
22+:: A mark's text without its /- lines, which Ford resolves and ride
23+:: can't parse.
24+++ mark-text
25+ |= lines=wain
26+ ^- @t
27+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
22++ report
28++ report
23 ^- @t
29 ^- @t
24− (of-wain:format (fixture-output prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text missing-decl) (text value-clash) (text poke-clash) (text scry) (text scry-bad)))
30+ (of-wain:format (fixture-output prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text missing-decl) (text value-clash) (text poke-clash) (text scry) (text scry-bad)))
25++ test-api-path-analysis
31++ test-api-path-analysis
26 ^- tang
32 ^- tang
27 ?~ sur ~[leaf+"API path fixture sur is missing"]
33 ?~ sur ~[leaf+"API path fixture sur is missing"]
tests/lib/jibb-buttons.hoon+1−1
@@ -2,7 +2,7 @@
2/+ jibb
2/+ jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* source %jibb /tests/golden/doc-grammar-02-buttons/source/jibb
5+/* source %jibb /my-app/ui/components/buttons/jibb
6/* valid %txt /tests/type-buttons/valid/txt
6/* valid %txt /tests/type-buttons/valid/txt
7/* expected %txt /tests/type-buttons/expected/txt
7/* expected %txt /tests/type-buttons/expected/txt
8/* error %txt /tests/type-buttons/error/txt
8/* error %txt /tests/type-buttons/error/txt
tests/lib/jibb-doc-examples.hoon+11−5
@@ -6,15 +6,21 @@
6/* view-day %jibb /tests/golden/doc-grammar-03-view-day/source/jibb
6/* view-day %jibb /tests/golden/doc-grammar-03-view-day/source/jibb
7/* step %jibb /tests/golden/doc-grammar-04-step/source/jibb
7/* step %jibb /tests/golden/doc-grammar-04-step/source/jibb
8/* cmd-sub %jibb /tests/golden/doc-overview-01-cmd-sub/source/jibb
8/* cmd-sub %jibb /tests/golden/doc-overview-01-cmd-sub/source/jibb
9−/* todo-sur %txt /tests/type-api-paths/todo-sur/txt
9+/* todo-sur %txt /my-app/sur/todo/hoon
10−/* todo-action %txt /tests/type-api-paths/todo-action/txt
10+/* todo-action %txt /my-app/mar/todo-action/hoon
11−/* blog-sur %txt /tests/type-page-main/blog-sur/txt
11+/* blog-sur %txt /my-app/sur/blog/hoon
12−/* card %txt /tests/type-page-main/card/txt
12+/* card %txt /my-app/ui/components/card/jibb
13|%
13|%
14++ text
14++ text
15 |= lines=wain
15 |= lines=wain
16 ^- @t
16 ^- @t
17 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
17 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
18+:: A mark's text without its /- lines, which Ford resolves and ride
19+:: can't parse.
20+++ mark-text
21+ |= lines=wain
22+ ^- @t
23+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
18::
24::
19++ doc-detailed
25++ doc-detailed
20 |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
26 |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
@@ -161,6 +167,6 @@
161++ test-doc-examples
167++ test-doc-examples
162 ^- tang
168 ^- tang
163 =/ failures=(list tape)
169 =/ failures=(list tape)
164− (doc-examples-errors prelude internal imports view-day step cmd-sub (text todo-sur) (text todo-action) (text blog-sur) (text card))
170+ (doc-examples-errors prelude internal imports view-day step cmd-sub (text todo-sur) (mark-text todo-action) (text blog-sur) (text card))
165 (turn failures |=(reason=tape leaf+reason))
171 (turn failures |=(reason=tape leaf+reason))
166--
172--
tests/lib/jibb-gate-free-source.hoon+14−8
@@ -2,13 +2,13 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* api %txt /tests/type-api-paths/api/txt
10+/* api %txt /my-app/ui/api/todo/jibb
11−/* source %txt /tests/type-gate-free/todo/txt
11+/* source %txt /my-app/ui/todo-list/jibb
12/* gate-source %txt /tests/type-gate-free/todo-gate/txt
12/* gate-source %txt /tests/type-gate-free/todo-gate/txt
13/* noun-source %txt /tests/type-gate-free/todo-noun/txt
13/* noun-source %txt /tests/type-gate-free/todo-noun/txt
14/* expected %txt /tests/type-gate-free/expected/txt
14/* expected %txt /tests/type-gate-free/expected/txt
@@ -17,6 +17,12 @@
17 |= lines=wain
17 |= lines=wain
18 ^- @t
18 ^- @t
19 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
19 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
20+:: A mark's text without its /- lines, which Ford resolves and ride
21+:: can't parse.
22+++ mark-text
23+ |= lines=wain
24+ ^- @t
25+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
20++ gate-free-source-report
26++ gate-free-source-report
21 |= [public=@t private=@t sur-text=@t action-text=@t todos-text=@t update-text=@t item-text=@t api-text=@t source-text=@t gate-text=@t noun-text=@t]
27 |= [public=@t private=@t sur-text=@t action-text=@t todos-text=@t update-text=@t item-text=@t api-text=@t source-text=@t gate-text=@t noun-text=@t]
22 ^- @t
28 ^- @t
@@ -89,7 +95,7 @@
89 'todo model: gate-free\0acallback model: gate at callback\0anoun model: unknown\0azero fuel: unknown\0aoversized fuel: capped\0ainvalid inputs: rejected\0asource evidence: retained\0amatching root and unused sur: accepted\0aroot import cycle: rejected'
95 'todo model: gate-free\0acallback model: gate at callback\0anoun model: unknown\0azero fuel: unknown\0aoversized fuel: capped\0ainvalid inputs: rejected\0asource evidence: retained\0amatching root and unused sur: accepted\0aroot import cycle: rejected'
90++ report
96++ report
91 ^- @t
97 ^- @t
92− (gate-free-source-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source) (text gate-source) (text noun-source))
98+ (gate-free-source-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text source) (text gate-source) (text noun-source))
93++ test-gate-free-source
99++ test-gate-free-source
94 ^- tang
100 ^- tang
95 =/ actual=@t report
101 =/ actual=@t report
tests/lib/jibb-page-main.hoon+21−15
@@ -2,20 +2,20 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* todo-api %txt /tests/type-page-main/todo-api/txt
10+/* todo-api %txt /my-app/ui/api/todo/jibb
11−/* todo-island %txt /tests/type-page-main/todo-island/txt
11+/* todo-island %txt /my-app/ui/todo-list/jibb
12−/* blog-sur %txt /tests/type-page-main/blog-sur/txt
12+/* blog-sur %txt /my-app/sur/blog/hoon
13−/* posts %txt /tests/type-page-main/posts-mark/txt
13+/* posts %txt /my-app/mar/posts/hoon
14−/* blog-api %txt /tests/type-page-main/blog-api/txt
14+/* blog-api %txt /my-app/ui/api/blog/jibb
15−/* card %txt /tests/type-page-main/card/txt
15+/* card %txt /my-app/ui/components/card/jibb
16−/* about %txt /tests/type-page-main/static/txt
16+/* about %txt /my-app/ui/about/jibb
17−/* blog-index %txt /tests/type-page-main/blog-index/txt
17+/* blog-index %txt /my-app/ui/blog/index/jibb
18−/* index %txt /tests/type-page-main/index/txt
18+/* index %txt /my-app/ui/index/jibb
19/* ctor-page %txt /tests/type-page-main/ctor-page/txt
19/* ctor-page %txt /tests/type-page-main/ctor-page/txt
20/* wrong-static %txt /tests/type-page-main/wrong-static/txt
20/* wrong-static %txt /tests/type-page-main/wrong-static/txt
21/* arbitrary-main %txt /tests/type-page-main/arbitrary-main/txt
21/* arbitrary-main %txt /tests/type-page-main/arbitrary-main/txt
@@ -30,6 +30,12 @@
30 |= lines=wain
30 |= lines=wain
31 ^- @t
31 ^- @t
32 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
32 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
33+:: A mark's text without its /- lines, which Ford resolves and ride
34+:: can't parse.
35+++ mark-text
36+ |= lines=wain
37+ ^- @t
38+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
33::
39::
34++ page-main-detailed
40++ page-main-detailed
35 |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
41 |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
@@ -163,6 +169,6 @@
163 ['diff load' (text diff-load)]
169 ['diff load' (text diff-load)]
164 ==
170 ==
165 =/ failures=(list tape)
171 =/ failures=(list tape)
166− (page-main-errors prelude internal (text sur) (text action) (text todos) (text update) (text item) (text todo-api) (text todo-island) (text blog-sur) (text posts) (text blog-api) (text card) (text about) (text blog-index) (text index) (text ctor-page) negatives)
172+ (page-main-errors prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text todo-api) (text todo-island) (text blog-sur) (mark-text posts) (text blog-api) (text card) (text about) (text blog-index) (text index) (text ctor-page) negatives)
167 (turn failures |=(reason=tape leaf+reason))
173 (turn failures |=(reason=tape leaf+reason))
168--
174--
tests/lib/jibb-program-watch.hoon+13−7
@@ -2,17 +2,23 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* api %txt /tests/type-api-paths/api/txt
10+/* api %txt /my-app/ui/api/todo/jibb
11|%
11|%
12++ text
12++ text
13 |= lines=wain
13 |= lines=wain
14 ^- @t
14 ^- @t
15 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
15 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
16+:: A mark's text without its /- lines, which Ford resolves and ride
17+:: can't parse.
18+++ mark-text
19+ |= lines=wain
20+ ^- @t
21+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
16::
22::
17++ program-watch-prepared
23++ program-watch-prepared
18 |= [public=@t private=@t]
24 |= [public=@t private=@t]
@@ -204,6 +210,6 @@
204 ?~ item ~[leaf+"program-watch fixture item is missing"]
210 ?~ item ~[leaf+"program-watch fixture item is missing"]
205 ?~ api ~[leaf+"program-watch fixture api is missing"]
211 ?~ api ~[leaf+"program-watch fixture api is missing"]
206 =/ failures=(list tape)
212 =/ failures=(list tape)
207− (program-watch-errors prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api))
213+ (program-watch-errors prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api))
208 (turn failures |=(reason=tape leaf+reason))
214 (turn failures |=(reason=tape leaf+reason))
209--
215--
tests/lib/jibb-store.hoon+2−2
@@ -2,8 +2,8 @@
2/+ jibb
2/+ jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* cart %txt /tests/type-store/cart/txt
5+/* cart %txt /my-app/ui/stores/cart/jibb
6−/* basket %txt /tests/type-store/basket/txt
6+/* basket %txt /my-app/ui/basket/jibb
7|%
7|%
8++ text
8++ text
9 |= lines=wain
9 |= lines=wain
tests/lib/jibb-theme.hoon+1−1
@@ -2,7 +2,7 @@
2/+ jibb
2/+ jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* source %txt /tests/type-theme/source/txt
5+/* source %txt /my-app/ui/theme/jibb
6/* dark-absent %txt /tests/type-theme/dark-absent/txt
6/* dark-absent %txt /tests/type-theme/dark-absent/txt
7/* wrong-nested-aura %txt /tests/type-theme/wrong-nested-aura/txt
7/* wrong-nested-aura %txt /tests/type-theme/wrong-nested-aura/txt
8/* missing-field %txt /tests/type-theme/missing-field/txt
8/* missing-field %txt /tests/type-theme/missing-field/txt
tests/lib/jibb-todo-api.hoon+13−7
@@ -2,12 +2,12 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* api %txt /tests/type-api-paths/api/txt
10+/* api %txt /my-app/ui/api/todo/jibb
11/* source %txt /tests/type-todo-api/source/txt
11/* source %txt /tests/type-todo-api/source/txt
12/* negative %txt /tests/type-todo-api/negative/txt
12/* negative %txt /tests/type-todo-api/negative/txt
13/* unsupported %txt /tests/type-todo-api/unsupported/txt
13/* unsupported %txt /tests/type-todo-api/unsupported/txt
@@ -18,6 +18,12 @@
18 |= lines=wain
18 |= lines=wain
19 ^- @t
19 ^- @t
20 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
20 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
21+:: A mark's text without its /- lines, which Ford resolves and ride
22+:: can't parse.
23+++ mark-text
24+ |= lines=wain
25+ ^- @t
26+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
21++ todo-run
27++ todo-run
22 |= [prelude=@t internal=@t sur=@t action=@t todos=@t update=@t item=@t api=@t source=@t negative=@t unsupported=@t]
28 |= [prelude=@t internal=@t sur=@t action=@t todos=@t update=@t item=@t api=@t source=@t negative=@t unsupported=@t]
23 ^- [report=@t bad-report=@t guards=@t]
29 ^- [report=@t bad-report=@t guards=@t]
@@ -74,7 +80,7 @@
74 [report bad-report guards]
80 [report bad-report guards]
75++ todo-out
81++ todo-out
76 ^- [report=@t bad-report=@t guards=@t]
82 ^- [report=@t bad-report=@t guards=@t]
77− (todo-run prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source) (text negative) (text unsupported))
83+ (todo-run prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text source) (text negative) (text unsupported))
78++ report
84++ report
79 ^- @t
85 ^- @t
80 report:todo-out
86 report:todo-out
tests/lib/jibb-todo-full.hoon+19−13
@@ -2,13 +2,13 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* api %txt /tests/type-api-paths/api/txt
10+/* api %txt /my-app/ui/api/todo/jibb
11−/* source %txt /tests/type-gate-free/todo/txt
11+/* source %txt /my-app/ui/todo-list/jibb
12/* wrong-model %txt /tests/type-todo-full/wrong-model/txt
12/* wrong-model %txt /tests/type-todo-full/wrong-model/txt
13/* wrong-message %txt /tests/type-todo-full/wrong-message/txt
13/* wrong-message %txt /tests/type-todo-full/wrong-message/txt
14/* wrong-result %txt /tests/type-todo-full/wrong-result/txt
14/* wrong-result %txt /tests/type-todo-full/wrong-result/txt
@@ -24,6 +24,12 @@
24 |= lines=wain
24 |= lines=wain
25 ^- @t
25 ^- @t
26 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
26 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
27+:: A mark's text without its /- lines, which Ford resolves and ride
28+:: can't parse.
29+++ mark-text
30+ |= lines=wain
31+ ^- @t
32+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
27::
33::
28++ todo-full-detailed
34++ todo-full-detailed
29 |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
35 |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
@@ -65,7 +71,7 @@
65::
71::
66++ report
72++ report
67 ^- @t
73 ^- @t
68− (todo-full-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source))
74+ (todo-full-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text source))
69::
75::
70++ todo-full-legacy-report
76++ todo-full-legacy-report
71 |= [public=@t private=@t sur=@t action=@t todos=@t update=@t item=@t api=@t src=@t]
77 |= [public=@t private=@t sur=@t action=@t todos=@t update=@t item=@t api=@t src=@t]
@@ -131,19 +137,19 @@
131 ?. =((to-wain:format (cat 3 got '\0a')) expected)
137 ?. =((to-wain:format (cat 3 got '\0a')) expected)
132 ~[leaf+"full todo report differs"]
138 ~[leaf+"full todo report differs"]
133 =/ legacy=@t
139 =/ legacy=@t
134− (todo-full-legacy-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source))
140+ (todo-full-legacy-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text source))
135 ?. =((to-wain:format (cat 3 legacy '\0a')) expected)
141 ?. =((to-wain:format (cat 3 legacy '\0a')) expected)
136 ~[leaf+"legacy full todo report differs"]
142 ~[leaf+"legacy full todo report differs"]
137 =/ cast-report=@t
143 =/ cast-report=@t
138− (todo-full-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text cast-init))
144+ (todo-full-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text cast-init))
139 ?. =((to-wain:format (cat 3 cast-report '\0a')) expected)
145 ?. =((to-wain:format (cat 3 cast-report '\0a')) expected)
140 ~[leaf+"ordinary annotated initializer was rejected"]
146 ~[leaf+"ordinary annotated initializer was rejected"]
141 =/ cast-legacy=@t
147 =/ cast-legacy=@t
142− (todo-full-legacy-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text cast-init))
148+ (todo-full-legacy-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text cast-init))
143 ?. =((to-wain:format (cat 3 cast-legacy '\0a')) expected)
149 ?. =((to-wain:format (cat 3 cast-legacy '\0a')) expected)
144 ~[leaf+"legacy ordinary annotated initializer was rejected"]
150 ~[leaf+"legacy ordinary annotated initializer was rejected"]
145 =/ imported=@t
151 =/ imported=@t
146− (todo-full-import-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source))
152+ (todo-full-import-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text source))
147 ?. =(imported 'downstream import accepted')
153 ?. =(imported 'downstream import accepted')
148 ~[leaf+"downstream full todo import differs"]
154 ~[leaf+"downstream full todo import differs"]
149 =/ negatives=(list [label=@t src=@t])
155 =/ negatives=(list [label=@t src=@t])
@@ -161,7 +167,7 @@
161 |= c=[label=@t src=@t]
167 |= c=[label=@t src=@t]
162 =/ expected=@t (cat 3 label.c ': rejected')
168 =/ expected=@t (cat 3 label.c ': rejected')
163 =/ actual=@t
169 =/ actual=@t
164− (todo-full-negative-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) label.c src.c)
170+ (todo-full-negative-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) label.c src.c)
165 ?. =(expected actual) `actual
171 ?. =(expected actual) `actual
166 ~
172 ~
167 ?^ bad (turn bad |=(reason=@t leaf+(trip reason)))
173 ?^ bad (turn bad |=(reason=@t leaf+(trip reason)))
tests/lib/jibb-todo-partial.hoon+14−8
@@ -2,19 +2,25 @@
2/+ jibb, jibb-import
2/+ jibb, jibb-import
3/* prelude %jibb /lib/jibb/prelude/jibb
3/* prelude %jibb /lib/jibb/prelude/jibb
4/* internal %jibb /lib/jibb/internal/jibb
4/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
5+/* sur %txt /my-app/sur/todo/hoon
6−/* action %txt /tests/type-api-paths/todo-action/txt
6+/* action %txt /my-app/mar/todo-action/hoon
7−/* todos %txt /tests/type-api-paths/todos/txt
7+/* todos %txt /my-app/mar/todos/hoon
8−/* update %txt /tests/type-api-paths/todo-update/txt
8+/* update %txt /my-app/mar/todo-update/hoon
9−/* item %txt /tests/type-api-paths/todo-item/txt
9+/* item %txt /my-app/mar/todo-item/hoon
10−/* api %txt /tests/type-api-paths/api/txt
10+/* api %txt /my-app/ui/api/todo/jibb
11−/* source %txt /tests/type-gate-free/todo/txt
11+/* source %txt /my-app/ui/todo-list/jibb
12/* expected %txt /tests/type-todo-partial/expected/txt
12/* expected %txt /tests/type-todo-partial/expected/txt
13|%
13|%
14++ text
14++ text
15 |= lines=wain
15 |= lines=wain
16 ^- @t
16 ^- @t
17 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
17 (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
18+:: A mark's text without its /- lines, which Ford resolves and ride
19+:: can't parse.
20+++ mark-text
21+ |= lines=wain
22+ ^- @t
23+ (text (skip lines |=(line=@t =('/-' (end [3 2] line)))))
18++ todo-island-report
24++ todo-island-report
19 |= [public=@t private=@t sur-text=@t action-text=@t todos-text=@t update-text=@t item-text=@t api-text=@t source-text=@t]
25 |= [public=@t private=@t sur-text=@t action-text=@t todos-text=@t update-text=@t item-text=@t api-text=@t source-text=@t]
20 ^- @t
26 ^- @t
@@ -49,7 +55,7 @@
49 (of-wain:format (weld ~['unchanged todo: partial inference only' normal 'negative API imports'] (weld failures ~['missing module: partial report' missing-module])))
55 (of-wain:format (weld ~['unchanged todo: partial inference only' normal 'negative API imports'] (weld failures ~['missing module: partial report' missing-module])))
50++ report
56++ report
51 ^- @t
57 ^- @t
52− (todo-island-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source))
58+ (todo-island-report prelude internal (text sur) (mark-text action) (mark-text todos) (mark-text update) (mark-text item) (text api) (text source))
53++ test-todo-partial
59++ test-todo-partial
54 ^- tang
60 ^- tang
55 ?~ source ~[leaf+"todo source fixture is missing"]
61 ?~ source ~[leaf+"todo source fixture is missing"]
tests/my-app-copies.txt+5−36
@@ -1,21 +1,12 @@
1−# Files under tests/ that copy a my-app source, for the checks that
1+# Files under tests/ that copy my-app/mar/label.hoon without its first
2−# cannot read my-app, which is not on the jibb-dev desk. tools/test-arms
2+# line, a comment. Tests read my-app's other sources where the jibb-dev
3+# desk holds them, under /my-app, and golden cases link to them.
3−# checks every pair before it runs anything (--copies runs only that).
4+# tools/test-arms checks every pair before it runs anything (--copies
5+# runs only that).
4#
6#
5# COPY SOURCE [without LINE]: the copy equals the source, or the source
7# COPY SOURCE [without LINE]: the copy equals the source, or the source
6# with the first occurrence of LINE and its newline removed.
8# with the first occurrence of LINE and its newline removed.
7
9
8−tests/golden/doc-grammar-02-buttons/source.jibb my-app/ui/components/buttons.jibb
9−tests/golden/doc-grammar-06-cart-store/source.jibb my-app/ui/stores/cart.jibb
10−tests/golden/doc-grammar-07-basket/source.jibb my-app/ui/basket.jibb
11−tests/golden/doc-overview-02-theme/source.jibb my-app/ui/theme.jibb
12−tests/golden/doc-overview-04-todo-api/source.jibb my-app/ui/api/todo.jibb
13−tests/golden/doc-overview-08-about/source.jibb my-app/ui/about.jibb
14−tests/golden/doc-overview-09-blog-index/source.jibb my-app/ui/blog/index.jibb
15−tests/golden/doc-overview-10-todo-list/source.jibb my-app/ui/todo-list.jibb
16−tests/golden/doc-overview-11-index/source.jibb my-app/ui/index.jibb
17−tests/golden/fixture-blog-api/source.jibb my-app/ui/api/blog.jibb
18−tests/golden/fixture-blog-card/source.jibb my-app/ui/components/card.jibb
19tests/golden/module-import-api-derived-clash/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
10tests/golden/module-import-api-derived-clash/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
20tests/golden/module-import-api-import-error/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
11tests/golden/module-import-api-import-error/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
21tests/golden/module-import-api-mark-prelude-value/mar/same.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
12tests/golden/module-import-api-mark-prelude-value/mar/same.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
@@ -29,28 +20,6 @@ tests/golden/module-import-api-request-reason/mar/full.txt my-app/mar/l
29tests/golden/module-import-api-scope-conflict/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
20tests/golden/module-import-api-scope-conflict/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
30tests/golden/module-import-root-import-shadow/mar/label.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
21tests/golden/module-import-root-import-shadow/mar/label.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
31tests/golden/types-import-mark/mar/label.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
22tests/golden/types-import-mark/mar/label.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
32−tests/golden/types-module-fixtures/modules/ui/api/blog.jibb my-app/ui/api/blog.jibb
33−tests/golden/types-module-fixtures/modules/ui/components/card.jibb my-app/ui/components/card.jibb
34−tests/golden/types-module-fixtures/source.jibb my-app/ui/blog/index.jibb
35tests/golden/types-module-mixed/mar/label.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
23tests/golden/types-module-mixed/mar/label.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
36tests/golden/types-request-normal/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
24tests/golden/types-request-normal/mar/full.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
37−tests/type-api-paths/api.txt my-app/ui/api/todo.jibb
38−tests/type-api-paths/todo-action.txt my-app/mar/todo-action.hoon without /- todo
39−tests/type-api-paths/todo-item.txt my-app/mar/todo-item.hoon without /- todo
40−tests/type-api-paths/todo-sur.txt my-app/sur/todo.hoon
41−tests/type-api-paths/todo-update.txt my-app/mar/todo-update.hoon without /- todo
42−tests/type-api-paths/todos.txt my-app/mar/todos.hoon without /- todo
43−tests/type-gate-free/todo.txt my-app/ui/todo-list.jibb
44−tests/type-page-main/blog-api.txt my-app/ui/api/blog.jibb
45−tests/type-page-main/blog-index.txt my-app/ui/blog/index.jibb
46−tests/type-page-main/blog-sur.txt my-app/sur/blog.hoon
47−tests/type-page-main/card.txt my-app/ui/components/card.jibb
48−tests/type-page-main/index.txt my-app/ui/index.jibb
49−tests/type-page-main/posts-mark.txt my-app/mar/posts.hoon without /- blog
50−tests/type-page-main/static.txt my-app/ui/about.jibb
51−tests/type-page-main/todo-api.txt my-app/ui/api/todo.jibb
52−tests/type-page-main/todo-island.txt my-app/ui/todo-list.jibb
53tests/type-poke/mark.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
25tests/type-poke/mark.txt my-app/mar/label.hoon without :: Fixture for the Hoon mark importer; not supplied by the design doc.
54−tests/type-store/basket.txt my-app/ui/basket.jibb
55−tests/type-store/cart.txt my-app/ui/stores/cart.jibb
56−tests/type-theme/source.txt my-app/ui/theme.jibb
tests/type-api-paths/api.txtdeleted−13
@@ -1,13 +0,0 @@
1−:: /ui/api/todo.jibb
2−/- todo
3−/% %todo-action
4−/% %todos
5−/% %todo-update
6−/% %todo-item
7−
8−+$ item item.todo
9−+$ poke todo-action
10−+$ paths
11− [%todos /todos todos]
12− [%changes /changes (facts todos todo-update)]
13− [%todo-by-id /todo/[id=@ud] todo-item]
tests/type-api-paths/todo-action.txtdeleted−6
@@ -1,6 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|_ a=action:todo
3−++ grab |% ++ noun action:todo --
4−++ grow |% ++ noun a --
5−++ grad %noun
6−--
tests/type-api-paths/todo-item.txtdeleted−6
@@ -1,6 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|_ a=item:todo
3−++ grab |% ++ noun item:todo --
4−++ grow |% ++ noun a --
5−++ grad %noun
6−--
tests/type-api-paths/todo-sur.txtdeleted−12
@@ -1,12 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|%
3−+$ item [id=@ud done=? text=@t]
4−+$ action
5− $% [%add text=@t]
6− [%toggle id=@ud]
7− ==
8−+$ update
9− $% [%added item=item]
10− [%toggled id=@ud]
11− ==
12−--
tests/type-api-paths/todo-update.txtdeleted−6
@@ -1,6 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|_ a=update:todo
3−++ grab |% ++ noun update:todo --
4−++ grow |% ++ noun a --
5−++ grad %noun
6−--
tests/type-api-paths/todos.txtdeleted−6
@@ -1,6 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|_ a=(list item:todo)
3−++ grab |% ++ noun (list item:todo) --
4−++ grow |% ++ noun a --
5−++ grad %noun
6−--
tests/type-gate-free/about.txt+1−1
@@ -1 +1 @@
1−The unchanged todo island source is used only to resolve its model mold through the actual todo API, /sur and mark readers. tools/test-arms checks its copy against the application source through tests/my-app-copies.txt. Controls also add a callback or noun field and exercise unavailable, malformed and ambiguous input. This is partial mold analysis only: no complete module, island kind, runtime or watchability claim is made.
1+The unchanged todo island source is used only to resolve its model mold through the actual todo API, /sur and mark readers. The suites read it from my-app/ui/todo-list.jibb on the jibb-dev desk. Controls also add a callback or noun field and exercise unavailable, malformed and ambiguous input. This is partial mold analysis only: no complete module, island kind, runtime or watchability claim is made.
tests/type-gate-free/todo.txtdeleted−40
@@ -1,40 +0,0 @@
1−/= todo /ui/api/todo
2−
3−++ main (program init update view subs)
4−
5−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
6−+$ msg
7− [%typed text=@t]
8− %submit
9− [%toggled id=@ud]
10− [%got todos=(list item.todo)]
11− [%acked err=(unit @t)]
12−
13−++ init |= ts=(list item.todo)
14− [ts "" ~]
15−
16−++ update |= [=msg m=model]
17− ?- msg
18− [%typed t]
19− ?- (gth (lent (tuba (trip t))) 80)
20− %.y [m(draft=t error=`"Too long") ~]
21− %.n [m(draft=t error=~) ~]
22− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
23− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
24− [%got ts] [m(todos=ts) ~]
25− [%acked err] [m(error=err) ~]
26−
27−++ subs |= m=model
28− ~[[%watch (todos.todo |=%got)]]
29−
30−++ view |= m=model
31− column ~[gap+%s2] ~[
32− heading 2 "Todos"
33− each (turn todos.m row-of)
34− row ~[gap+%s1] ~[
35− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
36− button "Add" %submit
37− el ~[tone+%danger] (text (fall error.m ""))
38−
39−++ row-of |= t=item.todo
40− [id.t (toggle done.t text.t [%toggled id.t])]
tests/type-page-main/about.txt+1−1
@@ -1,3 +1,3 @@
1−source: my-app/ui/about.jibb, my-app/ui/blog/index.jibb and my-app/ui/index.jibb; their fixtures and real API/UI/reader sources must remain byte-identical.
1+source: my-app/ui/about.jibb, my-app/ui/blog/index.jibb and my-app/ui/index.jibb, with the API, UI, /sur and mark sources they use, all read from my-app on the jibb-dev desk.
2tests: Shared eval and ship full checks for static and direct data pages, exact closed main types, a direct-constructor reply, structural downstream imports, and rejection of wrong/arbitrary mains, page aliases, indirect, pure, hand-built, typed and diff loads, missing evidence and store paths. No rendering or runtime request execution is claimed.
2tests: Shared eval and ship full checks for static and direct data pages, exact closed main types, a direct-constructor reply, structural downstream imports, and rejection of wrong/arbitrary mains, page aliases, indirect, pure, hand-built, typed and diff loads, missing evidence and store paths. No rendering or runtime request execution is claimed.
3expect: shared eval and ship guards
3expect: shared eval and ship guards
tests/type-page-main/blog-api.txtdeleted−5
@@ -1,5 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−/% %posts
3−
4−+$ paths
5− [%posts /posts posts]
tests/type-page-main/blog-index.txtdeleted−9
@@ -1,9 +0,0 @@
1−/- blog
2−/= api /ui/api/blog
3−/= card /ui/components/card
4−
5−++ main (page load view)
6−++ load |=(~ (posts.api same))
7−
8−++ view |= ps=(list post.blog)
9− column ~[gap+%s2] (turn ps card.card)
tests/type-page-main/blog-sur.txtdeleted−6
@@ -1,6 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|%
3−+$ title @t
4−+$ post [title=title slug=@ta]
5−+$ chain $@(~ [value=@ud next=chain])
6−--
tests/type-page-main/card.txtdeleted−5
@@ -1,5 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−/- blog
3−
4−++ card |= p=post.blog
5− text title.p
tests/type-page-main/index.txtdeleted−10
@@ -1,10 +0,0 @@
1−/= todo /ui/api/todo
2−/= todo-list /ui/todo-list
3−
4−++ main (page load view)
5−++ load |=(~ (todos.todo same))
6−
7−++ view |= ts=(list item.todo)
8− column ~[pad+%s3] ~[
9− heading 1 "My ship"
10− island main.todo-list ts
tests/type-page-main/posts-mark.txtdeleted−6
@@ -1,6 +0,0 @@
1−:: Fixture for the documented examples; not supplied by the design doc.
2−|_ a=(list post:blog)
3−++ grab |% ++ noun (list post:blog) --
4−++ grow |% ++ noun a --
5−++ grad %noun
6−--
tests/type-page-main/static.txtdeleted−7
@@ -1,7 +0,0 @@
1−++ main view
2−
3−++ view
4− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
5− heading 1 "About this ship"
6− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
7− el ~[tone+%accent] (link %/blog "Read the blog")
tests/type-page-main/todo-api.txtdeleted−13
@@ -1,13 +0,0 @@
1−:: /ui/api/todo.jibb
2−/- todo
3−/% %todo-action
4−/% %todos
5−/% %todo-update
6−/% %todo-item
7−
8−+$ item item.todo
9−+$ poke todo-action
10−+$ paths
11− [%todos /todos todos]
12− [%changes /changes (facts todos todo-update)]
13− [%todo-by-id /todo/[id=@ud] todo-item]
tests/type-page-main/todo-island.txtdeleted−40
@@ -1,40 +0,0 @@
1−/= todo /ui/api/todo
2−
3−++ main (program init update view subs)
4−
5−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
6−+$ msg
7− [%typed text=@t]
8− %submit
9− [%toggled id=@ud]
10− [%got todos=(list item.todo)]
11− [%acked err=(unit @t)]
12−
13−++ init |= ts=(list item.todo)
14− [ts "" ~]
15−
16−++ update |= [=msg m=model]
17− ?- msg
18− [%typed t]
19− ?- (gth (lent (tuba (trip t))) 80)
20− %.y [m(draft=t error=`"Too long") ~]
21− %.n [m(draft=t error=~) ~]
22− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
23− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
24− [%got ts] [m(todos=ts) ~]
25− [%acked err] [m(error=err) ~]
26−
27−++ subs |= m=model
28− ~[[%watch (todos.todo |=%got)]]
29−
30−++ view |= m=model
31− column ~[gap+%s2] ~[
32− heading 2 "Todos"
33− each (turn todos.m row-of)
34− row ~[gap+%s1] ~[
35− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
36− button "Add" %submit
37− el ~[tone+%danger] (text (fall error.m ""))
38−
39−++ row-of |= t=item.todo
40− [id.t (toggle done.t text.t [%toggled id.t])]
tests/type-store/basket.txtdeleted−32
@@ -1,32 +0,0 @@
1−:: /ui/basket.jibb
2−/= cart /ui/stores/cart
3−
4−++ main (program init update view subs)
5−
6−+$ model [cart=state.cart note=@t]
7−+$ msg
8− [%noted text=@t]
9− %add
10− %toggle
11− [%got cart=state.cart]
12− [%acked err=(unit @t)]
13−
14−++ init |= ~
15− [[~ %.n] ""]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%noted t] [m(note=t) ~]
20− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
21− %toggle [m ~[(poke.cart %toggle |=%acked)]]
22− [%got c] [m(cart=c) ~]
23− [%acked err] [m ~]
24−
25−++ subs |= m=model
26− ~[[%watch (state.cart |=%got)]]
27−
28−++ view |= m=model
29− column ~[gap+%s1] ~[
30− (text "{(lent items.cart.m)} items")
31− field "Item" note.m |=%noted
32− button "Add" %add
tests/type-store/cart.txtdeleted−12
@@ -1,12 +0,0 @@
1−:: /ui/stores/cart.jibb
2−+$ state [items=(list @t) open=?]
3−+$ poke
4− [%add item=@t]
5− %toggle
6−
7−++ main (store init update)
8−++ init ^- state [~ %.n]
9−++ update |= [a=poke s=state]
10− ?- a
11− [%add item] s(items=[item items.s])
12− %toggle s(open=(not open.s))
tests/type-theme/source.txtdeleted−8
@@ -1,8 +0,0 @@
1−++ theme ^- theme
2− [ space=[s1="4px" s2="8px" s3="16px"]
3− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
4− wide="60rem"
5− lang="en"
6− zone="UTC"
7− font=`%/static/fonts/inter.woff2
8− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
tests/type-todo-api/about.txt+1−1
@@ -1 +1 @@
1−The exact my-app todo API is checked with its actual /sur and mark reader fixtures. tools/test-arms checks the API fixture against the application source through tests/my-app-copies.txt. Positive and negative reports cover request callback polymorphism, the named one-diff fold, typed path arguments, poke, exported molds and a typed subscription expression. The interface guards check source and request evidence and reject missing or duplicate inputs, unsupported sibling declarations and private imports. Reports are partial inference, not a complete module check or runtime/watchability proof.
1+The exact my-app todo API is checked with its actual /sur and mark reader fixtures. The suite reads the API, /sur and marks from my-app on the jibb-dev desk. Positive and negative reports cover request callback polymorphism, the named one-diff fold, typed path arguments, poke, exported molds and a typed subscription expression. The interface guards check source and request evidence and reject missing or duplicate inputs, unsupported sibling declarations and private imports. Reports are partial inference, not a complete module check or runtime/watchability proof.
tests/type-todo-full/about.txt+1−1
@@ -1,3 +1,3 @@
1−source: docs/spec/overview.md, worked example 3; my-app/ui/todo-list.jibb must remain byte-identical to tests/type-gate-free/todo.txt, which tools/test-arms checks through tests/my-app-copies.txt.
1+source: docs/spec/overview.md, worked example 3, as my-app/ui/todo-list.jibb, which the suite reads from my-app on the jibb-dev desk.
2tests: Full detailed and legacy checking of the unchanged todo island through the real Hoon readers and API. Assert the exact closed main type and structural downstream import, plus a variant whose initializer is a gate cast to its full type, which only ordinary inference accepts, so it fails if a keyed view skips ordinary inference again, and wrong model/message/result, ambiguous or open mapper, aliased mapper, non-gate view, and wrong watch rejection. The report does not execute Jibb or establish runtime watching.
2tests: Full detailed and legacy checking of the unchanged todo island through the real Hoon readers and API. Assert the exact closed main type and structural downstream import, plus a variant whose initializer is a gate cast to its full type, which only ordinary inference accepts, so it fails if a keyed view skips ordinary inference again, and wrong model/message/result, ambiguous or open mapper, aliased mapper, non-gate view, and wrong watch rejection. The report does not execute Jibb or establish runtime watching.
3expect: shared eval and ship guards
3expect: shared eval and ship guards
tests/type-todo-partial/about.txt+1−1
@@ -1,4 +1,4 @@
1source: Overview, Worked examples: “`main.todo-list` is a record of exactly `init`, `update`, `view` and `subs`, whose types fix the data, model and messages.”
1source: Overview, Worked examples: “`main.todo-list` is a record of exactly `init`, `update`, `view` and `subs`, whose types fix the data, model and messages.”
2−tests: The unchanged todo island is resolved using the real prelude, todo API, source-aware Hoon `/sur`, and mark readers. The report records partial inference only; it does not claim the module, island kind, gate-free conditions, runtime, or watchability were checked. Missing and duplicate marks, an unavailable selected `/sur` mold, and an unavailable API module remain rejected or explicitly unavailable. `tools/test-arms` checks the mounted todo and API fixtures against their app sources through `tests/my-app-copies.txt`.
2+tests: The unchanged todo island is resolved using the real prelude, todo API, source-aware Hoon `/sur`, and mark readers. The report records partial inference only; it does not claim the module, island kind, gate-free conditions, runtime, or watchability were checked. Missing and duplicate marks, an unavailable selected `/sur` mold, and an unavailable API module remain rejected or explicitly unavailable. The suite reads the todo island and API from `my-app` on the `jibb-dev` desk.
3expect: parses
3expect: parses
4expect-types: a partial inference report
4expect-types: a partial inference report
tools/ship+47−11
@@ -59,11 +59,15 @@ TESTS_LIB = os.path.join(ROOT, 'tests', 'lib', 'jibb.hoon')
59
59
60# Desks the repo builds, and the folders each is assembled from, in
60# Desks the repo builds, and the folders each is assembled from, in
61# order. Every desk gets every package under vendor/. A folder is
61# order. Every desk gets every package under vendor/. A folder is
62−# (repo folder, desk folder, folders left out).
62+# (repo folder, desk folder, folders and files left out). The test
63+# desk holds my-app's sources under /my-app, so tests read them there
64+# instead of keeping copies.
63DESKS = {
65DESKS = {
64 'my-app': [('jibb-dev', '', ['tests']), ('my-app', '', [])],
66 'my-app': [('jibb-dev', '', ['tests']), ('my-app', '', [])],
65 'jibb': [('jibb', '', [])],
67 'jibb': [('jibb', '', [])],
66− 'jibb-dev': [('jibb-dev', '', []), ('tests', 'tests', [])],
68+ 'jibb-dev': [('jibb-dev', '', []), ('tests', 'tests', []),
69+ ('my-app', 'my-app',
70+ ['desk.bill', 'desk.docket-0', 'sys.kelvin'])],
67}
71}
68# The test desk has no sys.kelvin of its own; Clay refuses a commit
72# The test desk has no sys.kelvin of its own; Clay refuses a commit
69# without one, so it gets the %jibb desk's.
73# without one, so it gets the %jibb desk's.
@@ -861,7 +865,7 @@ class Assembly:
861 if fn.startswith('.'):
865 if fn.startswith('.'):
862 continue
866 continue
863 rel = os.path.join(rel_dir, fn)
867 rel = os.path.join(rel_dir, fn)
864− if drop and drop(rel):
868+ if rel in skip or (drop and drop(rel)):
865 continue
869 continue
866 desk_rel = os.path.join(into, rel) if into else rel
870 desk_rel = os.path.join(into, rel) if into else rel
867 with open(os.path.join(dirpath, fn), 'rb') as f:
871 with open(os.path.join(dirpath, fn), 'rb') as f:
@@ -903,7 +907,11 @@ def assemble(desk, lib=None, golden=None):
903 (isolated and rel.startswith('lib' + os.sep) and
907 (isolated and rel.startswith('lib' + os.sep) and
904 rel.endswith('.hoon')))
908 rel.endswith('.hoon')))
905 if os.path.isdir(golden):
909 if os.path.isdir(golden):
910+ # A case file that links to a file the desk already
911+ # holds, such as one of my-app's, is read from there.
906− a.add_tree(golden, os.path.join('tests', 'golden'))
912+ a.add_tree(golden, os.path.join('tests', 'golden'),
913+ drop=lambda rel: linked_desk_path(
914+ desk, os.path.join(golden, rel)) is not None)
907 a.add(os.path.join('tests', 'lib', 'jibb.hoon'),
915 a.add(os.path.join('tests', 'lib', 'jibb.hoon'),
908 generate_tests(golden).encode(),
916 generate_tests(golden).encode(),
909 'tools/ship gen-tests --golden %s' % show(golden))
917 'tools/ship gen-tests --golden %s' % show(golden))
@@ -921,6 +929,30 @@ def assemble(desk, lib=None, golden=None):
921 return a
929 return a
922
930
923
931
932+def linked_desk_path(desk, path):
933+ """The desk path of the file a symlink names, when the desk holds
934+ that file through another of its folders, or None."""
935+ if not os.path.islink(path):
936+ return None
937+ real = os.path.realpath(path)
938+ for folder, into, skip in DESKS[desk]:
939+ if folder == 'tests':
940+ continue
941+ rel = os.path.relpath(real, os.path.realpath(os.path.join(ROOT, folder)))
942+ if rel.startswith('..') or any(rel == s or rel.startswith(s + os.sep)
943+ for s in skip):
944+ continue
945+ return os.path.join(into, rel) if into else rel
946+ return None
947+
948+
949+def clay_file(desk, path, default):
950+ """How a generated /* names a golden case file: by the desk path
951+ of the file it links to, as linked_desk_path finds it, or default."""
952+ rel = linked_desk_path(desk, path)
953+ return '/' + '/'.join(clay_path(rel)) if rel is not None else default
954+
955+
924def check_assembly(a):
956def check_assembly(a):
925 problems = []
957 problems = []
926 for rel in sorted(a.files):
958 for rel in sorted(a.files):
@@ -956,6 +988,7 @@ TESTS_HEADER = """\
956:: Each file holds the output plus one newline. An expect-types: line
988:: Each file holds the output plus one newline. An expect-types: line
957:: or types.txt opts a case into golden-types and its types.txt output.
989:: or types.txt opts a case into golden-types and its types.txt output.
958:: Files come in through /*; a missing expected output fails its case.
990:: Files come in through /*; a missing expected output fails its case.
991+:: A case file that links to one of my-app's is read from /my-app.
959:: tools/ship test syncs the desk and runs -test /=jibb-dev=/tests.
992:: tools/ship test syncs the desk and runs -test /=jibb-dev=/tests.
960::
993::
961:: The .txt files reach Clay through the %txt mark, as lines, so the
994:: The .txt files reach Clay through the %txt mark, as lines, so the
@@ -1093,7 +1126,9 @@ def generate_tests(golden):
1093 for i, ((name, folder), arm) in enumerate(
1126 for i, ((name, folder), arm) in enumerate(
1094 zip(cases, arm_names([c[0] for c in cases])), 1):
1127 zip(cases, arm_names([c[0] for c in cases])), 1):
1095 base = '/tests/golden/%s' % name
1128 base = '/tests/golden/%s' % name
1096− lines.append('/* src-%d %%jibb %s/source/jibb' % (i, base))
1129+ lines.append('/* src-%d %%jibb %s' % (i, clay_file(
1130+ 'jibb-dev', os.path.join(folder, 'source.jibb'),
1131+ '%s/source/jibb' % base)))
1097 # a knot literal: a case's name may hold . and _, which a
1132 # a knot literal: a case's name may hold . and _, which a
1098 # path literal in Hoon can't, though /* takes them
1133 # path literal in Hoon can't, though /* takes them
1099 try:
1134 try:
@@ -1117,10 +1152,10 @@ def generate_tests(golden):
1117 args.append('~')
1152 args.append('~')
1118 call = '(%s %s)' % ('check-at' if logical else 'check', ' '.join(args))
1153 call = '(%s %s)' % ('check-at' if logical else 'check', ' '.join(args))
1119 module_fixtures = []
1154 module_fixtures = []
1120− for j, (module, at, _) in enumerate(modules, 1):
1155+ for j, (module, at, fixture) in enumerate(modules, 1):
1121 face = 'mod-%d-%d' % (i, j)
1156 face = 'mod-%d-%d' % (i, j)
1122− lines.append('/* %s %%jibb %s/modules%s/jibb' %
1157+ lines.append('/* %s %%jibb %s' % (face, clay_file(
1123− (face, base, module[:-5]))
1158+ 'jibb-dev', fixture, '%s/modules%s/jibb' % (base, module[:-5]))))
1124 module_fixtures.append('[%s %s %s]' % (hoon_cord(module.encode()), at, face))
1159 module_fixtures.append('[%s %s %s]' % (hoon_cord(module.encode()), at, face))
1125 if golden_case.wants_types(folder):
1160 if golden_case.wants_types(folder):
1126 if os.path.isfile(os.path.join(folder, 'types.txt')):
1161 if os.path.isfile(os.path.join(folder, 'types.txt')):
@@ -2286,9 +2321,10 @@ EPILOG = """\
2286desks:
2321desks:
2287 my-app vendor/* + jibb-dev (without any tests/) + my-app
2322 my-app vendor/* + jibb-dev (without any tests/) + my-app
2288 jibb vendor/* + jibb
2323 jibb vendor/* + jibb
2324+ jibb-dev vendor/* + jibb-dev + tests + my-app (under /my-app, without
2289− jibb-dev vendor/* + jibb-dev + tests, the test desk: tests/golden from
2325+ its desk files), the test desk: tests/golden from --golden,
2326+ less the case files that link to my-app, tests/lib/jibb.hoon
2290− --golden, tests/lib/jibb.hoon generated from it, and sys.kelvin
2327+ generated from it, and sys.kelvin from jibb/
2291− from jibb/
2292A sync creates the desk if it's missing (as |new-desk does), mounts it at
2328A sync creates the desk if it's missing (as |new-desk does), mounts it at
2293<pier>/<desk>, makes the mount hold exactly the desk's files, runs
2329<pier>/<desk>, makes the mount hold exactly the desk's files, runs
2294|commit, and waits until the desk matches the repo, checking every file.
2330|commit, and waits until the desk matches the repo, checking every file.
tools/test-arms+2−2
@@ -30,8 +30,8 @@ Golden files, the /* %txt files bound to a face with "expected" in its
30name, must end in exactly one newline (a wain can't show it) and hold no
30name, must end in exactly one newline (a wain can't show it) and hold no
31line that starts "BAD " or ends ": BAD" (a check's own failure marker).
31line that starts "BAD " or ends ": BAD" (a check's own failure marker).
32That is checked before any eval, as are, when no suite or shard is named,
32That is checked before any eval, as are, when no suite or shard is named,
33−the files tests/my-app-copies.txt lists, which must match their my-app
33+the copies of my-app/mar/label.hoon that tests/my-app-copies.txt lists,
34−sources (the jibb-dev desk has no my-app; --copies checks only them).
34+which must match it (--copies checks only them).
35
35
36Exit status: 0 when every arm passes, 1 when one fails, 2 on a usage
36Exit status: 0 when every arm passes, 1 when one fails, 2 on a usage
37error.
37error.
tools/testdata/ship-selftest+27−13
@@ -408,10 +408,13 @@ def generator_checks(tmp):
408 check('static and data page sources and shared fixture are assembled',
408 check('static and data page sources and shared fixture are assembled',
409 {'tests/lib/jibb-page-main.hoon', 'tests/type-page-main/about.txt',
409 {'tests/lib/jibb-page-main.hoon', 'tests/type-page-main/about.txt',
410 *(f'tests/type-page-main/{name}.txt' for name in (
410 *(f'tests/type-page-main/{name}.txt' for name in (
411− 'static', 'blog-index', 'index', 'ctor-page', 'blog-api', 'card', 'blog-sur',
412− 'posts-mark', 'todo-api', 'todo-island', 'wrong-static',
413− 'arbitrary-main', 'page-alias', 'indirect-load', 'pure-load',
411+ 'ctor-page', 'wrong-static', 'arbitrary-main', 'page-alias',
414− 'hand-built-load', 'typed-load', 'diff-load'))}
412+ 'indirect-load', 'pure-load', 'hand-built-load', 'typed-load',
413+ 'diff-load')),
414+ *(f'my-app/{name}' for name in (
415+ 'ui/about.jibb', 'ui/blog/index.jibb', 'ui/index.jibb',
416+ 'ui/api/blog.jibb', 'ui/components/card.jibb', 'sur/blog.hoon',
417+ 'mar/posts.hoon', 'ui/api/todo.jibb', 'ui/todo-list.jibb'))}
415 <= set(normal.files))
418 <= set(normal.files))
416 check('program main sources and shared fixture are assembled',
419 check('program main sources and shared fixture are assembled',
417 {f'tests/type-program-main/{name}.txt' for name in (
420 {f'tests/type-program-main/{name}.txt' for name in (
@@ -432,29 +435,40 @@ def generator_checks(tmp):
432 {'tests/lib/jibb-program-watch.hoon', 'tests/type-program-watch/about.txt'}
435 {'tests/lib/jibb-program-watch.hoon', 'tests/type-program-watch/about.txt'}
433 <= set(normal.files))
436 <= set(normal.files))
434 check('unchanged cart store and basket fixtures are assembled',
437 check('unchanged cart store and basket fixtures are assembled',
435− {'tests/lib/jibb-store.hoon', 'tests/type-store/cart.txt',
438+ {'tests/lib/jibb-store.hoon', 'my-app/ui/stores/cart.jibb',
436− 'tests/type-store/basket.txt'} <= set(normal.files))
439+ 'my-app/ui/basket.jibb'} <= set(normal.files))
437 check('full todo sources and exact main report are assembled',
440 check('full todo sources and exact main report are assembled',
438− {'tests/lib/jibb-todo-full.hoon', 'tests/type-gate-free/todo.txt',
441+ {'tests/lib/jibb-todo-full.hoon', 'my-app/ui/todo-list.jibb',
439− 'tests/type-api-paths/api.txt', 'tests/type-todo-full/expected.txt',
442+ 'my-app/ui/api/todo.jibb', 'tests/type-todo-full/expected.txt',
440 *(f'tests/type-todo-full/{name}.txt' for name in (
443 *(f'tests/type-todo-full/{name}.txt' for name in (
441 'wrong-model', 'wrong-message', 'wrong-result', 'ambiguous-mapper',
444 'wrong-model', 'wrong-message', 'wrong-result', 'ambiguous-mapper',
442 'open-key', 'alias', 'wrong-watch', 'non-gate-view'))}
445 'open-key', 'alias', 'wrong-watch', 'non-gate-view'))}
443 <= set(normal.files))
446 <= set(normal.files))
444 check('buttons sources, schemes and exact error are assembled',
447 check('buttons sources, schemes and exact error are assembled',
445 {'tests/lib/jibb-buttons.hoon',
448 {'tests/lib/jibb-buttons.hoon',
446− 'tests/golden/doc-grammar-02-buttons/source.jibb',
449+ 'my-app/ui/components/buttons.jibb',
447 'tests/type-buttons/valid.txt', 'tests/type-buttons/expected.txt',
450 'tests/type-buttons/valid.txt', 'tests/type-buttons/expected.txt',
448 'tests/type-buttons/error.txt'} <= set(normal.files))
451 'tests/type-buttons/error.txt'} <= set(normal.files))
449 check('theme sources and shared fixture are assembled',
452 check('theme sources and shared fixture are assembled',
450− {'tests/lib/jibb-theme.hoon',
453+ {'tests/lib/jibb-theme.hoon', 'my-app/ui/theme.jibb',
451 *(f'tests/type-theme/{name}.txt' for name in (
454 *(f'tests/type-theme/{name}.txt' for name in (
452− 'source', 'dark-absent', 'wrong-nested-aura', 'missing-field',
455+ 'dark-absent', 'wrong-nested-aura', 'missing-field',
453 'wrong-font', 'wrong-dark'))}
456 'wrong-font', 'wrong-dark'))}
454 <= set(normal.files))
457 <= set(normal.files))
455 check('todo partial golden and reused sources are assembled',
458 check('todo partial golden and reused sources are assembled',
456− {'tests/type-todo-partial/expected.txt', 'tests/type-gate-free/todo.txt',
459+ {'tests/type-todo-partial/expected.txt', 'my-app/ui/todo-list.jibb',
460+ 'my-app/ui/api/todo.jibb'} <= set(normal.files))
461+ linked = 'tests/golden/doc-overview-02-theme/source.jibb'
462+ check('my-app is on the test desk, without its desk files',
463+ {'my-app/ui/theme.jibb', 'my-app/sur/todo.hoon',
464+ 'my-app/mar/todos.hoon'} <= set(normal.files) and
465+ not {'my-app/desk.bill', 'my-app/desk.docket-0',
457− 'tests/type-api-paths/api.txt'} <= set(normal.files))
466+ 'my-app/sys.kelvin'} & set(normal.files))
467+ check('a golden case file that links to my-app is read from /my-app',
468+ os.path.islink(os.path.join(ship.ROOT, linked)) and
469+ linked not in normal.files and
470+ '/my-app/ui/theme/jibb' in
471+ normal.files['tests/lib/jibb.hoon'][0].decode())
458 for label, kwargs in (('custom library', {'lib': STUB}),
472 for label, kwargs in (('custom library', {'lib': STUB}),
459 ('custom goldens', {'golden': CASES}),
473 ('custom goldens', {'golden': CASES}),
460 ('both overrides', {'lib': STUB, 'golden': CASES})):
474 ('both overrides', {'lib': STUB, 'golden': CASES})):