8000 Name 158 more form properties, with their purposes from Microsoft's reference by dominion525 · Pull Request #109 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/jetdb-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2076,15 +2076,17 @@ mod tests {
let value = |name| form_property(&design.properties, name);
assert_eq!(*value("RecordSource"), Cell::String("jp_クエリ_02".into()));
// A Yes/No property stored without a value, as SaveAsText writes NotDefault.
assert_eq!(*value("0x013A"), Cell::String("NotDefault".into()));
assert_eq!(*value("DividingLines"), Cell::String("NotDefault".into()));
assert_eq!(*value("DefaultView"), Cell::Number(5.0));
// A color as the number Access writes.
assert_eq!(
*value("DatasheetGridlinesColor"),
Cell::Number(f64::from(0x00E8_E8E8))
);
assert!(matches!(value("0x0178"), Cell::String(s) if s.starts_with('{')));
assert!(matches!(value("0x0179"), Cell::Bytes(b) if b.len() == 384));
assert!(matches!(value("GUID"), Cell::String(s) if s.starts_with('{')));
assert!(matches!(value("NameMap"), Cell::Bytes(b) if b.len() == 384));
// A property jetdb does not name is given by its number.
assert_eq!(*value("0x0250"), Cell::Bool(true));
assert!(matches!(
db.form_properties("NoSuchForm", None),
Err(PropertiesError::File(FileError::FormNotFound { .. }))
Expand Down
7 changes: 4 additions & 3 deletions crates/jetdb-wasm/tests/smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,12 @@ function checkForms(Database, build) {
const value = (properties, name) => properties.find((p) => p.name === name).value;
assert.equal(value(design.properties, "RecordSource"), "jp_クエリ_02", build);
assert.equal(design.properties.find((p) => p.name === "RecordSource").id, 0x9c, build);
assert.equal(design.properties.find((p) => p.name === "0x013A").id, 0x13a, build);
assert.equal(value(design.properties, "0x013A"), "NotDefault", build);
// A property jetdb does not name is given by its number.
assert.equal(design.properties.find((p) => p.name === "0x0250").id, 0x250, build);
assert.equal(value(design.properties, "DividingLines"), "NotDefault", build);
assert.equal(value(design.properties, "DefaultView"), 5, build);
assert.equal(value(design.properties, "DatasheetGridlinesColor"), 0xe8e8e8, build);
assert.ok(value(design.properties, "0x0179") instanceof Uint8Array, build);
assert.ok(value(design.properties, "NameMap") instanceof Uint8Array, build);
assert.equal(design.controls.length, 21, build);
assert.deepEqual(
{ name: design.controls[0].name, type: design.controls[0].type, typeCode: design.controls[0].typeCode },
Expand Down
Loading
Loading
0