diff --git a/test/grammar/schema/assign_stmt/assign_stmt_0/main.k b/test/grammar/schema/assign_stmt/assign_stmt_0/main.k new file mode 100644 index 000000000..1066a82a3 --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_0/main.k @@ -0,0 +1,14 @@ +schema Metadata: + environment?: str = "qa" + region?: str + name?: str + +schema MySchema1: + metadata?: Metadata = {} + + metadata.environment = "dev" + metadata.region = "us-east-1" + +output = MySchema1 { + metadata.name = "config" +} diff --git a/test/grammar/schema/assign_stmt/assign_stmt_0/stdout.golden b/test/grammar/schema/assign_stmt/assign_stmt_0/stdout.golden new file mode 100644 index 000000000..e2a1effb3 --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_0/stdout.golden @@ -0,0 +1,5 @@ +output: + metadata: + environment: dev + region: us-east-1 + name: config diff --git a/test/grammar/schema/assign_stmt/assign_stmt_1/main.k b/test/grammar/schema/assign_stmt/assign_stmt_1/main.k new file mode 100644 index 000000000..9992d221e --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_1/main.k @@ -0,0 +1,14 @@ +schema Metadata: + environment?: str = "qa" + region?: str + name?: str + +schema MySchema1: + metadata?: Metadata = {} + + metadata.environment = "dev" + + +output = MySchema1 { + metadata.name = "config" +} diff --git a/test/grammar/schema/assign_stmt/assign_stmt_1/stdout.golden b/test/grammar/schema/assign_stmt/assign_stmt_1/stdout.golden new file mode 100644 index 000000000..23403df35 --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_1/stdout.golden @@ -0,0 +1,4 @@ +output: + metadata: + environment: dev + name: config diff --git a/test/grammar/schema/assign_stmt/assign_stmt_2/main.k b/test/grammar/schema/assign_stmt/assign_stmt_2/main.k new file mode 100644 index 000000000..8be0f05ba --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_2/main.k @@ -0,0 +1,13 @@ +schema Metadata: + environment?: str = "qa" + region?: str + name?: str + +schema MySchema1: + metadata?: Metadata = { + name = "config" + } + metadata.environment = "dev" + metadata.region = "us-east-1" + +output = MySchema1 {} diff --git a/test/grammar/schema/assign_stmt/assign_stmt_2/stdout.golden b/test/grammar/schema/assign_stmt/assign_stmt_2/stdout.golden new file mode 100644 index 000000000..e2a1effb3 --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_2/stdout.golden @@ -0,0 +1,5 @@ +output: + metadata: + environment: dev + region: us-east-1 + name: config diff --git a/test/grammar/schema/assign_stmt/assign_stmt_3/main.k b/test/grammar/schema/assign_stmt/assign_stmt_3/main.k new file mode 100644 index 000000000..f1568a0f2 --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_3/main.k @@ -0,0 +1,16 @@ +schema Metadata: + environment: str + region: str + name: str + +schema MySchema1: + metadata: Metadata + +schema MySchema2(MySchema1): + metadata.environment = "dev" + +schema MySchema3(MySchema2): + metadata.region = "us-east-1" + +output = MySchema3 {metadata.name = "hello"} + diff --git a/test/grammar/schema/assign_stmt/assign_stmt_3/stdout.golden b/test/grammar/schema/assign_stmt/assign_stmt_3/stdout.golden new file mode 100644 index 000000000..5f647f0ee --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_3/stdout.golden @@ -0,0 +1,5 @@ +output: + metadata: + environment: dev + region: us-east-1 + name: hello diff --git a/test/grammar/schema/assign_stmt/assign_stmt_4/main.k b/test/grammar/schema/assign_stmt/assign_stmt_4/main.k new file mode 100644 index 000000000..ab61e786e --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_4/main.k @@ -0,0 +1,18 @@ +schema Metadata: + environment: str + region: str + name: str + +schema MySchema1: + metadata: Metadata + +schema MySchema2(MySchema1): + metadata.environment = "dev" + +schema MySchema3(MySchema2): + metadata.region = "us-east-1" + +output = MySchema3 { + metadata.name = "hello" + metadata.environment = "qa" +} diff --git a/test/grammar/schema/assign_stmt/assign_stmt_4/stdout.golden b/test/grammar/schema/assign_stmt/assign_stmt_4/stdout.golden new file mode 100644 index 000000000..5f647f0ee --- /dev/null +++ b/test/grammar/schema/assign_stmt/assign_stmt_4/stdout.golden @@ -0,0 +1,5 @@ +output: + metadata: + environment: dev + region: us-east-1 + name: hello diff --git a/test/grammar/schema/optional_attr/inherit_2/main.k b/test/grammar/schema/optional_attr/inherit_2/main.k new file mode 100644 index 000000000..bdfd4c299 --- /dev/null +++ b/test/grammar/schema/optional_attr/inherit_2/main.k @@ -0,0 +1,16 @@ +schema Metadata: + environment: str + region: str + name: str + +schema MySchema1: + metadata: Metadata + +schema MySchema2(MySchema1): + metadata: Metadata {environment = "dev"} + +schema MySchema3(MySchema2): + metadata: Metadata {region = "us-east-1"} + +output = MySchema3 {metadata.name = "hello"} + diff --git a/test/grammar/schema/optional_attr/inherit_2/stdout.golden b/test/grammar/schema/optional_attr/inherit_2/stdout.golden new file mode 100644 index 000000000..5f647f0ee --- /dev/null +++ b/test/grammar/schema/optional_attr/inherit_2/stdout.golden @@ -0,0 +1,5 @@ +output: + metadata: + environment: dev + region: us-east-1 + name: hello diff --git a/test/grammar/schema/optional_attr/inherit_3/main.k b/test/grammar/schema/optional_attr/inherit_3/main.k new file mode 100644 index 000000000..8edc480a2 --- /dev/null +++ b/test/grammar/schema/optional_attr/inherit_3/main.k @@ -0,0 +1,18 @@ +schema Metadata: + environment: str + region: str + name: str + +schema MySchema1: + metadata: Metadata + +schema MySchema2(MySchema1): + metadata: Metadata {environment = "dev"} + +schema MySchema3(MySchema2): + metadata: Metadata {region = "us-east-1"} + +output = MySchema3 { + metadata.name = "hello" + metadata.environment = "qa" +} diff --git a/test/grammar/schema/optional_attr/inherit_3/stdout.golden b/test/grammar/schema/optional_attr/inherit_3/stdout.golden new file mode 100644 index 000000000..c55b51309 --- /dev/null +++ b/test/grammar/schema/optional_attr/inherit_3/stdout.golden @@ -0,0 +1,5 @@ +output: + metadata: + environment: qa + region: us-east-1 + name: hello