Skip to content

Commit 156effb

Browse files
committed
Move some tests
1 parent 0219bba commit 156effb

2 files changed

Lines changed: 74 additions & 73 deletions

File tree

Razor/tests/syntax_test_attributes.cshtml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,80 @@
279279
<article data-example="@example.ID">
280280
</article>
281281

282+
@* TODO: Fix directive attributes *@
283+
<p @attributes="Stuff"></p>
284+
<label>InputValue:<input @bind="InputValue" @bind:culture="new CultureInfo("th-TH", false)" /></label>
285+
286+
<form method="post" @formname="starship-plain-form" @onsubmit="Submit" @onclick:preventDefault>
287+
<AntiforgeryToken />
288+
<ReferenceChild @ref="childComponent1" @rendermode='InteractiveAuto' />
289+
<div>
290+
<label>
291+
Identifier:
292+
<InputText @bind-Value="Model!.Id" />
293+
</label>
294+
</div>
295+
<div>
296+
<button type="submit">Submit</button>
297+
</div>
298+
</form>
299+
300+
<link rel="stylesheet" href="@Assets["BlazorApp.styles.css"]" />
301+
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.block.any.html *@
302+
@* ^ punctuation.definition.tag.begin.html *@
303+
@* ^^^^ entity.name.tag.block.any.html *@
304+
@* ^^^^^^^^^^^^^^^^ meta.attribute-with-value.html *@
305+
@* ^^^ entity.other.attribute-name.html *@
306+
@* ^ punctuation.separator.key-value.html *@
307+
@* ^^^^^^^^^^^^ meta.string.html string.quoted.double.html *@
308+
@* ^ punctuation.definition.string.begin.html *@
309+
@* ^ punctuation.definition.string.end.html *@
310+
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.href.html *@
311+
@* ^^^^ entity.other.attribute-name.href.html *@
312+
@* ^ punctuation.separator.key-value.html *@
313+
@* ^ meta.string.html string.quoted.double.html punctuation.definition.string.begin.html *@
314+
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.path.url.html meta.string.html string.quoted.double.html *@
315+
@* ^ punctuation.section.embedded.begin.cs-razor *@
316+
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.cs.embedded.html *@
317+
@* ^^^^^^ variable.other.cs *@
318+
@* ^^^^^^^^^^^^^^^^^^^^^^^^ meta.brackets.cs *@
319+
@* ^ punctuation.section.brackets.begin.cs *@
320+
@* ^^^^^^^^^^^^^^^^^^^^^^ meta.string.cs string.quoted.double.cs *@
321+
@* ^ punctuation.definition.string.begin.cs *@
322+
@* ^ punctuation.definition.string.end.cs *@
323+
@* ^ punctuation.section.brackets.end.cs *@
324+
@* ^ meta.string.html string.quoted.double.html punctuation.definition.string.end.html *@
325+
@* ^^ punctuation.definition.tag.end.html *@
326+
327+
<div id='@MyClass.MyId' class='theclass'></div>
328+
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.block.any.html *@
329+
@* ^ punctuation.definition.tag.begin.html *@
330+
@* ^^^ entity.name.tag.block.any.html *@
331+
@* ^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.id.html *@
332+
@* ^^ entity.other.attribute-name.id.html *@
333+
@* ^ punctuation.separator.key-value.html *@
334+
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.begin.html *@
335+
@* ^^^^^^^^^^^^^ meta.toc-list.id.html meta.string.html string.quoted.single.html *@
336+
@* ^ punctuation.section.embedded.begin.cs-razor *@
337+
@* ^^^^^^^^^^^^ source.cs.embedded.html *@
338+
@* ^^^^^^^ variable.other.cs *@
339+
@* ^ punctuation.accessor.dot.cs *@
340+
@* ^^^^ variable.other.cs *@
341+
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.end.html *@
342+
@* ^^^^^^^^^^^^^^^^ meta.attribute-with-value.class.html *@
343+
@* ^^^^^ entity.other.attribute-name.class.html *@
344+
@* ^ punctuation.separator.key-value.html *@
345+
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.begin.html *@
346+
@* ^^^^^^^^ meta.class-name.html meta.string.html string.quoted.single.html *@
347+
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.end.html *@
348+
@* ^ punctuation.definition.tag.end.html *@
349+
@* ^^ punctuation.definition.tag.begin.html *@
350+
@* ^^^ entity.name.tag.block.any.html *@
351+
@* ^ punctuation.definition.tag.end.html *@
352+
353+
@* BUG: The style should highlight but it doesn't. Most likely not fixable. *@
354+
@* <p @if (true) { <text>style="display: none"</text> }>Test</p> *@
355+
282356
@foreach (var item in Model)
283357
@* ^^^^^^^ keyword.control.loop.foreach.cs *@
284358
@* ^^^^^^^^^^^^^^^^^^^ meta.group.cs *@

Razor/tests/syntax_test_loneboco.cshtml

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -166,76 +166,6 @@
166166
@* ^ punctuation.separator.colon.cs *@
167167
@* ^^^^^^^ support.type.cs *@
168168

169-
<p @attributes="Stuff"></p>
170-
<label>InputValue:<input @bind="InputValue" @bind:culture="new CultureInfo("th-TH", false)" /></label>
171-
172-
<form method="post" @formname="starship-plain-form" @onsubmit="Submit" @onclick:preventDefault>
173-
<AntiforgeryToken />
174-
<ReferenceChild @ref="childComponent1" @rendermode='InteractiveAuto' />
175-
<div>
176-
<label>
177-
Identifier:
178-
<InputText @bind-Value="Model!.Id" />
179-
</label>
180-
</div>
181-
<div>
182-
<button type="submit">Submit</button>
183-
</div>
184-
</form>
185-
186-
<link rel="stylesheet" href="@Assets["BlazorApp.styles.css"]" />
187-
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.block.any.html *@
188-
@* ^ punctuation.definition.tag.begin.html *@
189-
@* ^^^^ entity.name.tag.block.any.html *@
190-
@* ^^^^^^^^^^^^^^^^ meta.attribute-with-value.html *@
191-
@* ^^^ entity.other.attribute-name.html *@
192-
@* ^ punctuation.separator.key-value.html *@
193-
@* ^^^^^^^^^^^^ meta.string.html string.quoted.double.html *@
194-
@* ^ punctuation.definition.string.begin.html *@
195-
@* ^ punctuation.definition.string.end.html *@
196-
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.href.html *@
197-
@* ^^^^ entity.other.attribute-name.href.html *@
198-
@* ^ punctuation.separator.key-value.html *@
199-
@* ^ meta.string.html string.quoted.double.html punctuation.definition.string.begin.html *@
200-
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.path.url.html meta.string.html string.quoted.double.html *@
201-
@* ^ punctuation.section.embedded.begin.cs-razor *@
202-
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.cs.embedded.html *@
203-
@* ^^^^^^ variable.other.cs *@
204-
@* ^^^^^^^^^^^^^^^^^^^^^^^^ meta.brackets.cs *@
205-
@* ^ punctuation.section.brackets.begin.cs *@
206-
@* ^^^^^^^^^^^^^^^^^^^^^^ meta.string.cs string.quoted.double.cs *@
207-
@* ^ punctuation.definition.string.begin.cs *@
208-
@* ^ punctuation.definition.string.end.cs *@
209-
@* ^ punctuation.section.brackets.end.cs *@
210-
@* ^ meta.string.html string.quoted.double.html punctuation.definition.string.end.html *@
211-
@* ^^ punctuation.definition.tag.end.html *@
212-
213-
<div id='@MyClass.MyId' class='theclass'></div>
214-
@* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.block.any.html *@
215-
@* ^ punctuation.definition.tag.begin.html *@
216-
@* ^^^ entity.name.tag.block.any.html *@
217-
@* ^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.id.html *@
218-
@* ^^ entity.other.attribute-name.id.html *@
219-
@* ^ punctuation.separator.key-value.html *@
220-
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.begin.html *@
221-
@* ^^^^^^^^^^^^^ meta.toc-list.id.html meta.string.html string.quoted.single.html *@
222-
@* ^ punctuation.section.embedded.begin.cs-razor *@
223-
@* ^^^^^^^^^^^^ source.cs.embedded.html *@
224-
@* ^^^^^^^ variable.other.cs *@
225-
@* ^ punctuation.accessor.dot.cs *@
226-
@* ^^^^ variable.other.cs *@
227-
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.end.html *@
228-
@* ^^^^^^^^^^^^^^^^ meta.attribute-with-value.class.html *@
229-
@* ^^^^^ entity.other.attribute-name.class.html *@
230-
@* ^ punctuation.separator.key-value.html *@
231-
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.begin.html *@
232-
@* ^^^^^^^^ meta.class-name.html meta.string.html string.quoted.single.html *@
233-
@* ^ meta.string.html string.quoted.single.html punctuation.definition.string.end.html *@
234-
@* ^ punctuation.definition.tag.end.html *@
235-
@* ^^ punctuation.definition.tag.begin.html *@
236-
@* ^^^ entity.name.tag.block.any.html *@
237-
@* ^ punctuation.definition.tag.end.html *@
238-
239169
@section test {
240170
@* ^ punctuation.section.embedded.begin.cs-razor *@
241171
@* ^^^^^^^ source.cs.embedded.html keyword.other.cs-razor *@
@@ -976,9 +906,6 @@
976906
@* ^ punctuation.accessor.dot.cs *@
977907
@* ^^^ variable.other.cs *@
978908
</text>
979-
980-
@* BUG: The style should highlight but it doesn't. Most likely not fixable. *@
981-
@* <p @if (true) { <text>style="display: none"</text> }>Test</p> *@
982909
}
983910
else if (DateTime.Now.Year == 2011)
984911
{

0 commit comments

Comments
 (0)