summaryrefslogtreecommitdiff
path: root/lib/query
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-05-06 16:40:54 +0200
committerSébastien Dailly <sebastien@dailly.me>2026-05-06 16:44:25 +0200
commita5efd7d15b4d049a4ed539ed5d9c2f1037d00973 (patch)
tree9b1f002f487b94c8ec7a6b37b761f2d2def10208 /lib/query
parentae4814880d7a2ad9c96e8f4001edf5032b9a7fb2 (diff)
Use the double dash as arguments in tests
Diffstat (limited to 'lib/query')
-rw-r--r--lib/query/tests/create.t10
-rw-r--r--lib/query/tests/insert.t18
2 files changed, 14 insertions, 14 deletions
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": [
> {