mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Add test for region spans
This commit is contained in:
46
tests/cases/fourslash/getOutliningSpansForRegions.ts
Normal file
46
tests/cases/fourslash/getOutliningSpansForRegions.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////// basic region
|
||||
////[|// #region
|
||||
////
|
||||
////// #endregion|]
|
||||
////
|
||||
////// region with label
|
||||
////[|// #region label1
|
||||
////
|
||||
////// #endregion|]
|
||||
////
|
||||
////// region with extra whitespace in all valid locations
|
||||
////[| // #region label2 label3
|
||||
////
|
||||
//// // #endregion|]
|
||||
////
|
||||
////// No space before directive
|
||||
////[|//#region label4
|
||||
////
|
||||
//////#endregion|]
|
||||
////
|
||||
////// Nested regions
|
||||
////[|// #region outer
|
||||
////
|
||||
////[|// #region inner
|
||||
////
|
||||
////// #endregion inner|]
|
||||
////
|
||||
////// #endregion outer|]
|
||||
////
|
||||
////// region delimiters not valid when preceding text on line
|
||||
//// test // #region invalid1
|
||||
////
|
||||
////test // #endregion
|
||||
////
|
||||
////// region delimiters not valid when in multiline comment
|
||||
/////*
|
||||
////// #region invalid2
|
||||
////*/
|
||||
////
|
||||
/////*
|
||||
////// #endregion
|
||||
////*/
|
||||
|
||||
verify.outliningSpansInCurrentFile(test.ranges());
|
||||
Reference in New Issue
Block a user