Commit Graph

1124 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran 8e62dbcae9 Change testing strategy for build server shutdown test 2018-10-30 13:20:33 -07:00
Ajay Bhargav Baaskaran 8674dd9236 Removed duplocate Id for a RazorDiagnostic 2018-10-29 11:25:29 -07:00
Ryan Nowak f425134ffe Fix #2265 - Port Blazor testing improvements
The Blazor test infrastructure made a copy of the code in Razor and then
added some more features. This change backports the features needed for
the style of test we're using in Blazor.

I updated the MVC integration tests to use the new style, but I think
there's limited value in trying to rev all of the old tests.

One feature in particular that I removed from the old infrastructure was
the automatic inference of imports based on the file system. This
feature was wierd and doesn't parallel how these features work in
actuality. It's easy and more natural to test imports in new style
tests.
2018-10-01 13:00:44 -07:00
Pranav K f70df60435 Move RazorGenerate and RazorTagHelper tasks in to the Sdk
Loading multiple versions of a task assembly result results in MSBuild on .NET Core to fail.
Addressing this by moving the tasks in to the Sdk and renaming it. This should avoid
immediate issues for a 2.1 and 2.2 project co-existing and future proofs 2.2 and later.

Fixes https://github.com/aspnet/Razor/issues/2553
2018-09-19 10:09:56 -07:00
Pranav K 7144add4ad
Check for ITagHelper in tag helper feature provider (#2602)
Fixes #2482
2018-09-18 16:52:34 -07:00
Pranav K fc86cc3ca1 Allow Invoke \ InvokeAsync methods for a ViewComponent to be defined in base types
Fixes https://github.com/aspnet/Mvc/issues/8397
2018-09-18 13:38:48 -07:00
Ryan Nowak 1e8e541f65 Clean up timeout reporting
This was sometimes reporting a null when the timeout takes place. We
need to throw with a timeout for real
2018-09-13 15:40:37 -07:00
Ajay Bhargav Baaskaran f93f67a53a
Better logging to help debug test failure (#2576) 2018-09-10 14:17:53 -07:00
N. Taylor Mullen 852ad8df87 Allow content to be written after caught exception from child TagHelper.
- The issue was that the `executeChildContentAsync` call was stopping the invocation of the `_endTagHelperWritingScope`. Therefore, we'd never finish the TagHelper content scope and all following content would be ignored.
- Added two tests to validate the new functionality.

#2561
2018-08-29 16:00:15 -07:00
Ajay Bhargav Baaskaran d097adee5f
Unblock VSTS linux builds (#2526)
* Unblock VSTS linux builds

* Updated yml
2018-08-08 10:48:16 -07:00
Pranav K 3ff064cea3 Lock when reading \ writing process output
Fixes #2516
2018-07-30 16:21:42 -07:00
N. Taylor Mullen cb557cf771 Changed `GetDesiredIndentation` to be resilient to our SyntaxTree which occasionally has gaps.
- Added a test to cover the scenario.

#2489
2018-07-30 10:45:18 -07:00
N. Taylor Mullen 38e145389e Fix BackgroundDocumentGenerator flaky tests.
- Some time spans were too aggressive for parsing a Razor file on a slow environment.
- Fixed an obvious race where we'd expect 0 pending notifications when it was possible to be in the process of clearing notifications.

#2506
2018-07-27 14:49:12 -07:00
Pranav K 676543b8c9 Skip BuildIncremental_SimpleMvc_PersistsTargetInputFile on xplat
For some inexplicable reason timestamps returned as part of the test often show up
as being different resulting in test flakiness. We've manually verified that this
is not a product issue and builds are correctly incremental on xplat. See #2219
for past discussions.

Fixes https://github.com/aspnet/Razor/issues/2503
2018-07-27 14:22:23 -07:00
Ajay Bhargav Baaskaran 8e23eb38b4 Honor NoBuild flag during publish 2018-07-26 11:40:38 -07:00
Doug Bunting 684e7855a6
Handle `null` entries correctly for `IsEmptyOrWhiteSpace`
- #2497

nits:
- take VS suggestions
- un-scramble `IsEmptyOrWhiteSpaceCore(...)` for readability
2018-07-23 15:25:41 -07:00
Ajay Bhargav Baaskaran eb6faf1754 Redo baselines 2018-07-19 15:29:30 -07:00
Ajay Bhargav Baaskaran 8e667ba730 Rename parser tests to have shorter names 2018-07-19 15:22:30 -07:00
Ajay Bhargav Baaskaran 7f6b05149d Generate deterministic unique ids for tag helpers 2018-07-17 14:01:42 -07:00
Ajay Bhargav Baaskaran 21f2edce16 Generate and verify baselines for ClassifiedSpans and TagHelperSpans
- Moved GetClassifiedSpans and GetTagHelperSpans logic to Razor.Language
2018-07-17 10:54:42 -07:00
N. Taylor Mullen cfd63e1e2e Change HTML splitting logic to not split on surrogate pairs.
- When a surrogate pair is about to be split down the middle we reduce the size of our split by 1 character. This way we split right before a surrogate pair. In the case of zero width joiners, if we split on a zero width joiner we still render valid bytes because the zero width joiner by itself can stand alone.
- Added tests for the various split cases.

#2470
2018-07-13 17:18:56 -07:00
Ajay Bhargav Baaskaran ce4780a830 Renamed symbol to token everywhere
- Updated Resources
- Updated test code
- Regenerated baselines
- Added exclusions for apicheck (See https://github.com/aspnet/BuildTools/issues/704)
2018-07-06 16:29:36 -07:00
Ajay Bhargav Baaskaran ed7c4e8f5c Parser tests clean up 2018-07-06 16:24:39 -07:00
Ajay Bhargav Baaskaran f9a09372b7 Converted TagHelperBlockRewriterTest 2018-06-29 15:33:21 -07:00
Ajay Bhargav Baaskaran 984e7826d6 Converted TagHelperParseTreeRewriterTest 2018-06-29 12:23:52 -07:00
Ajay Bhargav Baaskaran b232a1103a Prereq for converting tag helper tests 2018-06-29 12:15:13 -07:00
Ryan Nowak 942d4d194c Convert HtmlToCodeSwitchTest 2018-06-28 13:30:52 -07:00
N. Taylor Mullen 42e8f4abc8 Convert HtmlTagsTest to use baselines.
#2263
2018-06-28 10:49:15 -07:00
N. Taylor Mullen 8211dfff9c Convert HtmlErrorTest to use baselines.
#2263
2018-06-28 10:49:15 -07:00
Ryan Nowak ea96c50dce Convert WhitespaceRewriterTest 2018-06-27 17:02:03 -07:00
Ajay Bhargav Baaskaran 8eef4a4bb3 Convert HtmlDocumentTest 2018-06-27 15:47:57 -07:00
N. Taylor Mullen 67b5588185 Convert CSharpWhitespaceHandlingTest to use baselines.
#2263
2018-06-27 15:09:33 -07:00
Ajay Bhargav Baaskaran 048a6ec3ea Converted HtmlAttributeTest 2018-06-27 14:47:44 -07:00
N. Taylor Mullen 5950928baa Convert CSharpSpecialBlockTest to use baselines.
#2263
2018-06-27 14:35:22 -07:00
Ajay Bhargav Baaskaran a7fd53b3a3 Convert CSharpNestedStatementsTest 2018-06-27 13:43:51 -07:00
Ajay Bhargav Baaskaran df22392996 Convert CSharpImplicitExpressionTest 2018-06-27 13:43:51 -07:00
Ajay Bhargav Baaskaran d48946c2e0 Convert CSharpExplicitExpressionTest 2018-06-27 13:43:50 -07:00
Ryan Nowak 363be73a00 Convert more tests
CSharpRazorCommentsTest
CSharpReservedKeyWordsTest
CSharpToMarkupSwitchTest
2018-06-27 13:14:58 -07:00
Ryan Nowak 4fda468f06 Convert CSharpSectionTest 2018-06-27 13:14:58 -07:00
Ajay Bhargav Baaskaran c0929a9002 Convert CSharpErrorTest 2018-06-27 12:53:52 -07:00
N. Taylor Mullen 69cfb95b90 Convert CSharpStatementTest to use baselines.
#2263
2018-06-27 12:24:52 -07:00
N. Taylor Mullen 25547e80d1 Convert CSharpTemplateTest to use baselines.
#2263
2018-06-27 12:24:52 -07:00
Ajay Bhargav Baaskaran ab27e0bd52 Converted CSharpBlockTest to use baselines 2018-06-26 18:02:50 -07:00
Ajay Bhargav Baaskaran 1e58748f59 Converted HtmlBlockTest to use baselines 2018-06-26 16:09:05 -07:00
Ajay Bhargav Baaskaran a92089d2f9 Converted CSharpDirectivesTest to use baselines 2018-06-26 15:17:36 -07:00
Ajay Bhargav Baaskaran 2aea2c6b9f Use correct newline string when splitting baselines 2018-06-25 14:38:15 -07:00
Ajay Bhargav Baaskaran fdf4a0dca8 Fix build break 2018-06-25 14:14:29 -07:00
Ajay Bhargav Baaskaran c7959c3c43 Fix failing tests 2018-06-25 13:55:53 -07:00
Ajay Bhargav Baaskaran 999c24d78d Converted more parser tests to baselines
- Converted CSharpAutoCompleteTest
2018-06-25 11:43:17 -07:00
N. Taylor Mullen 9b000397b3 Add NoBuild test that includes content.
- Also fixed wording of existing nobuild test.
2018-06-21 14:36:07 -07:00