summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/configuration/tests/configuration.t8
-rw-r--r--lib/configuration/tests/errors.t10
-rw-r--r--lib/configuration/tests/tree.t8
-rw-r--r--lib/model/tests/parent.t10
-rw-r--r--lib/query/tests/create.t10
-rw-r--r--lib/query/tests/insert.t18
-rw-r--r--lib/splay/tests/splay.t44
7 files changed, 54 insertions, 54 deletions
diff --git a/lib/configuration/tests/configuration.t b/lib/configuration/tests/configuration.t
index a732db6..e44b91a 100644
--- a/lib/configuration/tests/configuration.t
+++ b/lib/configuration/tests/configuration.t
@@ -2,7 +2,7 @@ The configuration is written in JSON5 format.
Minimal configuration file with nothing:
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> { "content" : [] }
>
> EOF
@@ -10,7 +10,7 @@ Minimal configuration file with nothing:
Trailing coma are accepted:
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> { "content" :
> [
> {
@@ -23,7 +23,7 @@ Trailing coma are accepted:
Comments are accepted:
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> { "content" :
> [
> {
@@ -37,7 +37,7 @@ Comments are accepted:
Cycles between elements are accepted when they are not mandatory to each other
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> {
> "content": [
> {
diff --git a/lib/configuration/tests/errors.t b/lib/configuration/tests/errors.t
index 6b5584e..58c15ed 100644
--- a/lib/configuration/tests/errors.t
+++ b/lib/configuration/tests/errors.t
@@ -2,7 +2,7 @@ Differents invalid configuration. All of them shall report the error properly
Every content shall have an identifier
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> {
> "content": [
> {
@@ -18,7 +18,7 @@ Every content shall have an identifier
The content ID cannot be empty:
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> {
> "content": [
> {
@@ -33,7 +33,7 @@ The content ID cannot be empty:
The content ID cannot be contains "." (this charater is used internaly):
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> {
> "content": [
> {
@@ -51,7 +51,7 @@ The content ID cannot be contains "." (this charater is used internaly):
A reference shall point to an existing content:
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> {
> "content": [
> {
@@ -78,7 +78,7 @@ A reference shall point to an existing content:
Cycles between required content are not accepted
- $ tests -configuration <<EOF
+ $ tests --configuration <<EOF
> {
> "content": [
> {
diff --git a/lib/configuration/tests/tree.t b/lib/configuration/tests/tree.t
index b69c830..2e9df4b 100644
--- a/lib/configuration/tests/tree.t
+++ b/lib/configuration/tests/tree.t
@@ -4,7 +4,7 @@ configuration.
Each reference field introduce a dependency between the content having the field
and the content targeted by the field.
- $ tests -configuration -tree <<EOF
+ $ tests --configuration --tree <<EOF
> {
> "content": [
> {
@@ -42,7 +42,7 @@ and the content targeted by the field.
The tree only contains root elements. Links between subcontent are reported as
link between their respective root content.
- $ tests -configuration -tree <<EOF
+ $ tests --configuration --tree <<EOF
> {
> "content": [
> {
@@ -81,7 +81,7 @@ link between their respective root content.
}
- $ tests -configuration -tree <<EOF
+ $ tests --configuration --tree <<EOF
> {
> "content": [
> {
@@ -125,7 +125,7 @@ link between their respective root content.
A content is allowed to loop to itself, directly or indirectly:
- $ tests -configuration -tree <<EOF
+ $ tests --configuration --tree <<EOF
> {
> "content": [
> {
diff --git a/lib/model/tests/parent.t b/lib/model/tests/parent.t
index 8e77578..1ccf8e8 100644
--- a/lib/model/tests/parent.t
+++ b/lib/model/tests/parent.t
@@ -1,7 +1,7 @@
A root content does not have any parent
- $ tests -parent "entity" <<EOF
+ $ tests --parent "entity" <<EOF
> {
> "content": [
> {
@@ -14,7 +14,7 @@ A root content does not have any parent
A root content is the root of itself
- $ tests -parent -root "entity" <<EOF
+ $ tests --parent --root "entity" <<EOF
> {
> "content": [
> {
@@ -27,7 +27,7 @@ A root content is the root of itself
The parent of a subcontent shall never been None, and will target the container
- $ tests -parent "details" <<EOF
+ $ tests --parent "details" <<EOF
> {
> "content": [
> {
@@ -45,7 +45,7 @@ The parent of a subcontent shall never been None, and will target the container
The parent element can be a subcontent itself
- $ tests -parent "level2" <<EOF
+ $ tests --parent "level2" <<EOF
> {
> "content": [
> {
@@ -68,7 +68,7 @@ The parent element can be a subcontent itself
The root element is the top content
- $ tests -parent -root "level2" <<EOF
+ $ tests --parent --root "level2" <<EOF
> {
> "content": [
> {
diff --git a/lib/query/tests/create.t b/lib/query/tests/create.t
index 565235a..6ba48c3 100644
--- a/lib/query/tests/create.t
+++ b/lib/query/tests/create.t
@@ -5,7 +5,7 @@ to be succesfully created).
Test a single content with no field:
- $ tests -schema "entity" <<EOF
+ $ tests --schema "entity" <<EOF
> {
> "content": [
> {
@@ -19,7 +19,7 @@ Test a single content with no field:
Text fields or numeric fields are created as columns directly in the table:
- $ tests -schema "entity" <<EOF
+ $ tests --schema "entity" <<EOF
> {
> "content": [
> {
@@ -52,7 +52,7 @@ Text fields or numeric fields are created as columns directly in the table:
A subcontent is linked to the parent:
- $ tests -schema "details" <<EOF
+ $ tests --schema "details" <<EOF
> {
> "content": [
> {
@@ -73,7 +73,7 @@ A subcontent is linked to the parent:
A reference field is declared as a foreign key to the linked element
- $ tests -schema "entity" <<EOF
+ $ tests --schema "entity" <<EOF
> {
> "content": [
> {
@@ -114,7 +114,7 @@ A reference field is declared as a foreign key to the linked element
When the field is multivaluated, there is no column for this property in the
table but a dedicated table is created:
- $ tests -schema "entity" "entity.user_type" <<EOF
+ $ tests --schema "entity" "entity.user_type" <<EOF
> {
> "content": [
> {
diff --git a/lib/query/tests/insert.t b/lib/query/tests/insert.t
index 578dae4..e060ad4 100644
--- a/lib/query/tests/insert.t
+++ b/lib/query/tests/insert.t
@@ -7,7 +7,7 @@ subcontent)
Minimal exemple, a content without any field does not have any value:
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -25,7 +25,7 @@ Ensure an error is raised if the value does not match the expected type.
Here, the year is declared as an integer, but the value is provided as string.
This error is expected to be checked and reported.
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -49,7 +49,7 @@ This error is expected to be checked and reported.
Fatal error: exception Query__Encoder.TypeMismatch
[2]
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -85,7 +85,7 @@ This error is expected to be checked and reported.
{"name":"name","year":1234}
Any value can be omitted and will be replaced by the default value:
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -113,7 +113,7 @@ If the field is "required" the value is still inserted: the requirement feature
is only functionnal; this shall not block the creation of the content in the
database.
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -140,7 +140,7 @@ database.
A subcontent is linked to the parent:
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -208,7 +208,7 @@ A subcontent is linked to the parent:
In this syntax, external references are declared inside the feature referencing
them.
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -269,7 +269,7 @@ Four contents are created for the type referential here:
- Two as contents linked referenced by the content "entity" (ids 1 and 2).
- Two as contents not referenced at all (ids 3 and 4).
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
@@ -337,7 +337,7 @@ Four contents are created for the type referential here:
Subcontent are also managed in the same way.
- $ tests -insert <<EOF
+ $ tests --insert <<EOF
> {
> "content": [
> {
diff --git a/lib/splay/tests/splay.t b/lib/splay/tests/splay.t
index 628ccaa..64f77a6 100644
--- a/lib/splay/tests/splay.t
+++ b/lib/splay/tests/splay.t
@@ -6,9 +6,9 @@ See https://en.wikipedia.org/wiki/Splay_tree
The root is the latest inserted node:
- $ tests -splay_tree \
- > -add 5 \
- > -add 3
+ $ tests --splay_tree \
+ > --add 5 \
+ > --add 3
digraph G {
leaf_0 [shape=point]
"3" -> leaf_0
@@ -19,9 +19,9 @@ The root is the latest inserted node:
"5" -> leaf_2
}
- $ tests -splay_tree \
- > -add 3 \
- > -add 5
+ $ tests --splay_tree \
+ > --add 3 \
+ > --add 5
digraph G {
"5" -> "3"
leaf_0 [shape=point]
@@ -34,11 +34,11 @@ The root is the latest inserted node:
Collecting an element in the tree will push this node at the root:
- $ tests -splay_tree \
- > -add 1 \
- > -add 2 \
- > -add 3 \
- > -get 2
+ $ tests --splay_tree \
+ > --add 1 \
+ > --add 2 \
+ > --add 3 \
+ > --get 2
digraph G {
"2" -> "1"
leaf_0 [shape=point]
@@ -52,12 +52,12 @@ Collecting an element in the tree will push this node at the root:
"3" -> leaf_3
}
- $ tests -splay_tree \
- > -add 1 \
- > -add 2 \
- > -add 3 \
- > -add 4 \
- > -get 1
+ $ tests --splay_tree \
+ > --add 1 \
+ > --add 2 \
+ > --add 3 \
+ > --add 4 \
+ > --get 1
digraph G {
leaf_0 [shape=point]
"1" -> leaf_0
@@ -76,11 +76,11 @@ Collecting an element in the tree will push this node at the root:
Removing an element from the tree modify the structure
- $ tests -splay_tree \
- > -add 1 \
- > -add 2 \
- > -add 3 \
- > -del 2
+ $ tests --splay_tree \
+ > --add 1 \
+ > --add 2 \
+ > --add 3 \
+ > --del 2
digraph G {
leaf_0 [shape=point]
"1" -> leaf_0