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.
110 lines
2.8 KiB
TOML
110 lines
2.8 KiB
TOML
# This tests that we can switch the line terminator to the NUL byte.
|
|
[[test]]
|
|
name = "nul"
|
|
regex = '(?m)^[a-z]+$'
|
|
haystack = '\x00abc\x00'
|
|
matches = [[1, 4]]
|
|
unescape = true
|
|
line-terminator = '\x00'
|
|
|
|
# This tests that '.' will not match the configured line terminator, but will
|
|
# match \n.
|
|
[[test]]
|
|
name = "dot-changes-with-line-terminator"
|
|
regex = '.'
|
|
haystack = '\x00\n'
|
|
matches = [[1, 2]]
|
|
unescape = true
|
|
line-terminator = '\x00'
|
|
|
|
# This tests that when we switch the line terminator, \n is no longer
|
|
# recognized as the terminator.
|
|
[[test]]
|
|
name = "not-line-feed"
|
|
regex = '(?m)^[a-z]+$'
|
|
haystack = '\nabc\n'
|
|
matches = []
|
|
unescape = true
|
|
line-terminator = '\x00'
|
|
|
|
# This tests that we can set the line terminator to a non-ASCII byte and have
|
|
# it behave as expected.
|
|
[[test]]
|
|
name = "non-ascii"
|
|
regex = '(?m)^[a-z]+$'
|
|
haystack = '\xFFabc\xFF'
|
|
matches = [[1, 4]]
|
|
unescape = true
|
|
line-terminator = '\xFF'
|
|
utf8 = false
|
|
|
|
# This tests a tricky case where the line terminator is set to \r. This ensures
|
|
# that the StartLF look-behind assertion is tracked when computing the start
|
|
# state.
|
|
[[test]]
|
|
name = "carriage"
|
|
regex = '(?m)^[a-z]+'
|
|
haystack = 'ABC\rabc'
|
|
matches = [[4, 7]]
|
|
bounds = [4, 7]
|
|
unescape = true
|
|
line-terminator = '\r'
|
|
|
|
# This tests that we can set the line terminator to a byte corresponding to a
|
|
# word character, and things work as expected.
|
|
[[test]]
|
|
name = "word-byte"
|
|
regex = '(?m)^[a-z]+$'
|
|
haystack = 'ZabcZ'
|
|
matches = [[1, 4]]
|
|
unescape = true
|
|
line-terminator = 'Z'
|
|
|
|
# This tests that we can set the line terminator to a byte corresponding to a
|
|
# non-word character, and things work as expected.
|
|
[[test]]
|
|
name = "non-word-byte"
|
|
regex = '(?m)^[a-z]+$'
|
|
haystack = '%abc%'
|
|
matches = [[1, 4]]
|
|
unescape = true
|
|
line-terminator = '%'
|
|
|
|
# This combines "set line terminator to a word byte" with a word boundary
|
|
# assertion, which should result in no match even though ^/$ matches.
|
|
[[test]]
|
|
name = "word-boundary"
|
|
regex = '(?m)^\b[a-z]+\b$'
|
|
haystack = 'ZabcZ'
|
|
matches = []
|
|
unescape = true
|
|
line-terminator = 'Z'
|
|
|
|
# Like 'word-boundary', but does an anchored search at the point where ^
|
|
# matches, but where \b should not.
|
|
[[test]]
|
|
name = "word-boundary-at"
|
|
regex = '(?m)^\b[a-z]+\b$'
|
|
haystack = 'ZabcZ'
|
|
matches = []
|
|
bounds = [1, 4]
|
|
anchored = true
|
|
unescape = true
|
|
line-terminator = 'Z'
|
|
|
|
# Like 'word-boundary-at', but flips the word boundary to a negation. This
|
|
# in particular tests a tricky case in DFA engines, where they must consider
|
|
# explicitly that a starting configuration from a custom line terminator may
|
|
# also required setting the "is from word byte" flag on a state. Otherwise,
|
|
# it's treated as "not from a word byte," which would result in \B not matching
|
|
# here when it should.
|
|
[[test]]
|
|
name = "not-word-boundary-at"
|
|
regex = '(?m)^\B[a-z]+\B$'
|
|
haystack = 'ZabcZ'
|
|
matches = [[1, 4]]
|
|
bounds = [1, 4]
|
|
anchored = true
|
|
unescape = true
|
|
line-terminator = 'Z'
|