Skip to content

Commit

Permalink
Additional baseline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-c-martin committed Feb 1, 2021
1 parent 31e21db commit 5fd94b5
Show file tree
Hide file tree
Showing 22 changed files with 64 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions src/Bicep.Core.Samples/Files/InvalidResources_CRLF/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,13 @@ resource invalidExtensionResourceDuplicateName2 'Mock.Rp/mockExtResource@2019-01
resource invalidDecorator 'Microsoft.Foo/foos@2020-02-02-alpha'= {
name: 'invalidDecorator'
}

resource cyclicRes 'Mock.Rp/mockExistingResource@2020-01-01' = {
name: 'cyclicRes'
scope: cyclicRes
}

resource cyclicExistingRes 'Mock.Rp/mockExistingResource@2020-01-01' existing = {
name: 'cyclicExistingRes'
scope: cyclicExistingRes
}
Original file line number Diff line number Diff line change
Expand Up @@ -744,3 +744,14 @@ resource invalidDecorator 'Microsoft.Foo/foos@2020-02-02-alpha'= {
name: 'invalidDecorator'
}

resource cyclicRes 'Mock.Rp/mockExistingResource@2020-01-01' = {
name: 'cyclicRes'
scope: cyclicRes
//@[9:18) [BCP079 (Error)] This expression is referencing its own declaration, which is not allowed. |cyclicRes|
}

resource cyclicExistingRes 'Mock.Rp/mockExistingResource@2020-01-01' existing = {
name: 'cyclicExistingRes'
scope: cyclicExistingRes
//@[9:26) [BCP079 (Error)] This expression is referencing its own declaration, which is not allowed. |cyclicExistingRes|
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -694,3 +694,14 @@ resource invalidDecorator 'Microsoft.Foo/foos@2020-02-02-alpha'= {
name: 'invalidDecorator'
}

resource cyclicRes 'Mock.Rp/mockExistingResource@2020-01-01' = {
//@[9:18) Resource cyclicRes. Type: Mock.Rp/mockExistingResource@2020-01-01. Declaration start char: 0, length: 108
name: 'cyclicRes'
scope: cyclicRes
}

resource cyclicExistingRes 'Mock.Rp/mockExistingResource@2020-01-01' existing = {
//@[9:26) Resource cyclicExistingRes. Type: Mock.Rp/mockExistingResource@2020-01-01. Declaration start char: 0, length: 141
name: 'cyclicExistingRes'
scope: cyclicExistingRes
}
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions src/Bicep.Core.Samples/Files/Resources_CRLF/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,18 @@ resource extensionDependencies 'My.Rp/mockResource@2020-01-01' = {
res3runtime: extension2.properties.something
}
}

resource existing1 'Mock.Rp/existingExtensionResource@2020-01-01' existing = {
name: 'existing1'
scope: extension1
}

resource existing2 'Mock.Rp/existingExtensionResource@2020-01-01' existing = {
name: 'existing2'
scope: existing1
}

resource extension3 'My.Rp/extensionResource@2020-12-01' = {
name: 'extension3'
scope: existing1
}
Binary file not shown.
Binary file modified src/Bicep.Core.Samples/Files/Resources_CRLF/main.formatted.bicep
Binary file not shown.
Binary file modified src/Bicep.Core.Samples/Files/Resources_CRLF/main.json
Binary file not shown.
17 changes: 17 additions & 0 deletions src/Bicep.Core.Samples/Files/Resources_CRLF/main.symbols.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,20 @@ resource extensionDependencies 'My.Rp/mockResource@2020-01-01' = {
}
}

resource existing1 'Mock.Rp/existingExtensionResource@2020-01-01' existing = {
//@[9:18) Resource existing1. Type: Mock.Rp/existingExtensionResource@2020-01-01. Declaration start char: 0, length: 123
name: 'existing1'
scope: extension1
}

resource existing2 'Mock.Rp/existingExtensionResource@2020-01-01' existing = {
//@[9:18) Resource existing2. Type: Mock.Rp/existingExtensionResource@2020-01-01. Declaration start char: 0, length: 122
name: 'existing2'
scope: existing1
}

resource extension3 'My.Rp/extensionResource@2020-12-01' = {
//@[9:19) Resource extension3. Type: My.Rp/extensionResource@2020-12-01. Declaration start char: 0, length: 105
name: 'extension3'
scope: existing1
}
Binary file modified src/Bicep.Core.Samples/Files/Resources_CRLF/main.syntax.bicep
Binary file not shown.
Binary file modified src/Bicep.Core.Samples/Files/Resources_CRLF/main.tokens.bicep
Binary file not shown.

0 comments on commit 5fd94b5

Please sign in to comment.