forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add more test cases for schema inherit and modification in-place.
Signed-off-by: peefy <[email protected]>
- Loading branch information
Showing
14 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output: | ||
metadata: | ||
environment: dev | ||
region: us-east-1 | ||
name: config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output: | ||
metadata: | ||
environment: dev | ||
name: config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output: | ||
metadata: | ||
environment: dev | ||
region: us-east-1 | ||
name: config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output: | ||
metadata: | ||
environment: dev | ||
region: us-east-1 | ||
name: hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output: | ||
metadata: | ||
environment: dev | ||
region: us-east-1 | ||
name: hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output: | ||
metadata: | ||
environment: dev | ||
region: us-east-1 | ||
name: hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output: | ||
metadata: | ||
environment: qa | ||
region: us-east-1 | ||
name: hello |