From 4023903eac7c1bb76287b20133913a6d786b7c0d Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Thu, 23 Dec 2021 17:20:11 +0100 Subject: New property ``precision`` for ``decimal`` fields. --- .../complex/items/5084bc6e94f24dc6976629282ef30419.yaml | 1 + .../complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml | 1 + .../complex/items/a4265cc5dfa94c3d8030d7df4a0ab747.yaml | 17 +++++++++++++++++ tests/data/complex/settings.yaml | 3 +++ 4 files changed, 22 insertions(+) create mode 100644 tests/data/complex/items/a4265cc5dfa94c3d8030d7df4a0ab747.yaml (limited to 'tests/data/complex') diff --git a/tests/data/complex/items/5084bc6e94f24dc6976629282ef30419.yaml b/tests/data/complex/items/5084bc6e94f24dc6976629282ef30419.yaml index c0d6e90..df239bb 100644 --- a/tests/data/complex/items/5084bc6e94f24dc6976629282ef30419.yaml +++ b/tests/data/complex/items/5084bc6e94f24dc6976629282ef30419.yaml @@ -18,4 +18,5 @@ updated: epoch: version: 0 category: first +price: '3.50' # and a comment at the end diff --git a/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml b/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml index 0580675..28dc551 100644 --- a/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml +++ b/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml @@ -16,3 +16,4 @@ updated: epoch: version: 2 category: first +price: '1.00' diff --git a/tests/data/complex/items/a4265cc5dfa94c3d8030d7df4a0ab747.yaml b/tests/data/complex/items/a4265cc5dfa94c3d8030d7df4a0ab747.yaml new file mode 100644 index 0000000..0c040b3 --- /dev/null +++ b/tests/data/complex/items/a4265cc5dfa94c3d8030d7df4a0ab747.yaml @@ -0,0 +1,17 @@ +name: 'Floaty price' +description: | + An entry with the price stored as a float. +position: '' +something: +tags: [] +keywords: [] +exists: +with_default: 'default value' +amount: 0 +order: '' +created: 2021-12-23 15:32:22.100470+00:00 +updated: 2021-12-23 15:32:22.100486+00:00 +epoch: +version: 0 +category: '' +price: 1.90 diff --git a/tests/data/complex/settings.yaml b/tests/data/complex/settings.yaml index b85e2a2..f4ad574 100644 --- a/tests/data/complex/settings.yaml +++ b/tests/data/complex/settings.yaml @@ -60,3 +60,6 @@ fields: - second - third index: field + - name: price + type: decimal + precision: 2 -- cgit v1.2.3