Files
alkane-os/vendor/regex/testdata/iter.toml
T
x ad31cfbafa Vendor flare-ui v0.2.9 and prove the schema-driven UI in an image
Spike, not the final UI: it answers whether flare-ui can drive Alkane OS's
on-box pages, and what it costs.

What works:

- schema/alkane-bb.json authors the sidebar as data (3 sections, 14 tabs);
- src/bin/ui-spike.rs renders it through flare_ui::nav + flare_ui::shell, so
  the unified sidebar, ordering and surface filtering come from the schema
  rather than from hand-written HTML;
- the render uses the shared bf- design tokens, the same ones the rest of the
  suite uses.

Size, measured rather than assumed (armv7, release, stripped):

  ui-baseline   323 KiB   (maud + serde_json, no flare-ui)
  ui-spike      771 KiB   (flare-ui + wschema + sha2)
  marginal      448 KiB

Vendoring: third-party/flare-ui is the full v0.2.9 tree pinned in
flare-ui/flare-ui.lock (a partial archive does not compile, since the crate
include_str!s assets from dash-editor/). vendor/ is re-generated as a cargo
directory source with the new registry dependencies (maud, sha2, typenum,
digest, generic-array, block-buffer, crypto-common, cfg-if, etc.) so the build
still works offline. third-party/README.md records how to re-pin.
2026-11-04 14:06:25 -06:00

144 lines
2.7 KiB
TOML

[[test]]
name = "1"
regex = "a"
haystack = "aaa"
matches = [[0, 1], [1, 2], [2, 3]]
[[test]]
name = "2"
regex = "a"
haystack = "aba"
matches = [[0, 1], [2, 3]]
[[test]]
name = "empty1"
regex = ''
haystack = ''
matches = [[0, 0]]
[[test]]
name = "empty2"
regex = ''
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty3"
regex = '(?:)'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty4"
regex = '(?:)*'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty5"
regex = '(?:)+'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty6"
regex = '(?:)?'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty7"
regex = '(?:)(?:)'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty8"
regex = '(?:)+|z'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty9"
regex = 'z|(?:)+'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty10"
regex = '(?:)+|b'
haystack = 'abc'
matches = [[0, 0], [1, 1], [2, 2], [3, 3]]
[[test]]
name = "empty11"
regex = 'b|(?:)+'
haystack = 'abc'
matches = [[0, 0], [1, 2], [3, 3]]
[[test]]
name = "start1"
regex = "^a"
haystack = "a"
matches = [[0, 1]]
[[test]]
name = "start2"
regex = "^a"
haystack = "aa"
matches = [[0, 1]]
[[test]]
name = "anchored1"
regex = "a"
haystack = "a"
matches = [[0, 1]]
anchored = true
# This test is pretty subtle. It demonstrates the crucial difference between
# '^a' and 'a' compiled in 'anchored' mode. The former regex exclusively
# matches at the start of a haystack and nowhere else. The latter regex has
# no such restriction, but its automaton is constructed such that it lacks a
# `.*?` prefix. So it can actually produce matches at multiple locations.
# The anchored3 test drives this point home.
[[test]]
name = "anchored2"
regex = "a"
haystack = "aa"
matches = [[0, 1], [1, 2]]
anchored = true
# Unlikely anchored2, this test stops matching anything after it sees `b`
# since it lacks a `.*?` prefix. Since it is looking for 'a' but sees 'b', it
# determines that there are no remaining matches.
[[test]]
name = "anchored3"
regex = "a"
haystack = "aaba"
matches = [[0, 1], [1, 2]]
anchored = true
[[test]]
name = "nonempty-followedby-empty"
regex = 'abc|.*?'
haystack = "abczzz"
matches = [[0, 3], [4, 4], [5, 5], [6, 6]]
[[test]]
name = "nonempty-followedby-oneempty"
regex = 'abc|.*?'
haystack = "abcz"
matches = [[0, 3], [4, 4]]
[[test]]
name = "nonempty-followedby-onemixed"
regex = 'abc|.*?'
haystack = "abczabc"
matches = [[0, 3], [4, 7]]
[[test]]
name = "nonempty-followedby-twomixed"
regex = 'abc|.*?'
haystack = "abczzabc"
matches = [[0, 3], [4, 4], [5, 8]]