HelperVSCodePossibleExtension and
Person Title
This commit is contained in:
@ -14,6 +14,44 @@ internal static partial class HelperKanbanMetadata
|
||||
[GeneratedRegex("[\\s!?.,@:;|\\\\/\"'`£$%\\^&*{}[\\]()<>~#+\\-=_¬]+")]
|
||||
private static partial Regex InvalidCharacter();
|
||||
|
||||
private static void TestParamCases()
|
||||
{
|
||||
if (GetParamCase("PascalCase") != "pascal-case")
|
||||
throw new Exception("PascalCase");
|
||||
if (GetParamCase("camelCase") != "camel-case")
|
||||
throw new Exception("camelCase");
|
||||
if (GetParamCase("snake_case") != "snake-case")
|
||||
throw new Exception("snake_case");
|
||||
if (GetParamCase("No Case") != "no-case")
|
||||
throw new Exception("No Case");
|
||||
if (GetParamCase("With 2 numbers 3") != "with-2-numbers-3")
|
||||
throw new Exception("With 2 numbers 3");
|
||||
if (GetParamCase("Multiple spaces") != "multiple-spaces")
|
||||
throw new Exception("Multiple spaces");
|
||||
if (GetParamCase("Tab\tCharacter") != "tab-character")
|
||||
throw new Exception("Tab\tCharacter");
|
||||
if (GetParamCase("New\nLine") != "new-line")
|
||||
throw new Exception("New\nLine");
|
||||
if (GetParamCase("Punctuation, Characters") != "punctuation-characters")
|
||||
throw new Exception("Punctuation, Characters");
|
||||
if (GetParamCase("M!o?r.e, @p:u;n|c\\t/u\"a\'t`i£o$n% ^c&h*a{r}a[c]t(e)r<s> ~l#i+k-e= _t¬hese") != "m-o-r-e-p-u-n-c-t-u-a-t-i-o-n-c-h-a-r-a-c-t-e-r-s-l-i-k-e-t-hese")
|
||||
throw new Exception("M!o?r.e, @p:u;n|c\\t/u\"a\'t`i£o$n% ^c&h*a{r}a[c]t(e)r<s> ~l#i+k-e= _t¬hese");
|
||||
if (GetParamCase("This string ends with punctuation!") != "this-string-ends-with-punctuation")
|
||||
throw new Exception("This string ends with punctuation!");
|
||||
if (GetParamCase("?This string starts with punctuation") != "this-string-starts-with-punctuation")
|
||||
throw new Exception("?This string starts with punctuation");
|
||||
if (GetParamCase("#This string has punctuation at both ends&") != "this-string-has-punctuation-at-both-ends")
|
||||
throw new Exception("#This string has punctuation at both ends&");
|
||||
if (GetParamCase("軟件 測試") != "軟件-測試")
|
||||
throw new Exception("軟件 測試");
|
||||
if (GetParamCase("実験 試し") != "実験-試し")
|
||||
throw new Exception("実験 試し");
|
||||
if (GetParamCase("יקספּערמענאַל פּרובירן") != "יקספּערמענאַל-פּרובירן")
|
||||
throw new Exception("יקספּערמענאַל פּרובירן");
|
||||
if (GetParamCase("я надеюсь, что это сработает") != "я-надеюсь-что-это-сработает")
|
||||
throw new Exception("я надеюсь, что это сработает");
|
||||
}
|
||||
|
||||
private static List<(int, int, string, FileInfo)> GetCollectionFromIndex(string sourceDirectory, string[] lines)
|
||||
{
|
||||
List<(int, int, string, FileInfo)> results = new();
|
||||
@ -58,44 +96,6 @@ internal static partial class HelperKanbanMetadata
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void TestParamCases()
|
||||
{
|
||||
if (GetParamCase("PascalCase") != "pascal-case")
|
||||
throw new Exception("PascalCase");
|
||||
if (GetParamCase("camelCase") != "camel-case")
|
||||
throw new Exception("camelCase");
|
||||
if (GetParamCase("snake_case") != "snake-case")
|
||||
throw new Exception("snake_case");
|
||||
if (GetParamCase("No Case") != "no-case")
|
||||
throw new Exception("No Case");
|
||||
if (GetParamCase("With 2 numbers 3") != "with-2-numbers-3")
|
||||
throw new Exception("With 2 numbers 3");
|
||||
if (GetParamCase("Multiple spaces") != "multiple-spaces")
|
||||
throw new Exception("Multiple spaces");
|
||||
if (GetParamCase("Tab\tCharacter") != "tab-character")
|
||||
throw new Exception("Tab\tCharacter");
|
||||
if (GetParamCase("New\nLine") != "new-line")
|
||||
throw new Exception("New\nLine");
|
||||
if (GetParamCase("Punctuation, Characters") != "punctuation-characters")
|
||||
throw new Exception("Punctuation, Characters");
|
||||
if (GetParamCase("M!o?r.e, @p:u;n|c\\t/u\"a\'t`i£o$n% ^c&h*a{r}a[c]t(e)r<s> ~l#i+k-e= _t¬hese") != "m-o-r-e-p-u-n-c-t-u-a-t-i-o-n-c-h-a-r-a-c-t-e-r-s-l-i-k-e-t-hese")
|
||||
throw new Exception("M!o?r.e, @p:u;n|c\\t/u\"a\'t`i£o$n% ^c&h*a{r}a[c]t(e)r<s> ~l#i+k-e= _t¬hese");
|
||||
if (GetParamCase("This string ends with punctuation!") != "this-string-ends-with-punctuation")
|
||||
throw new Exception("This string ends with punctuation!");
|
||||
if (GetParamCase("?This string starts with punctuation") != "this-string-starts-with-punctuation")
|
||||
throw new Exception("?This string starts with punctuation");
|
||||
if (GetParamCase("#This string has punctuation at both ends&") != "this-string-has-punctuation-at-both-ends")
|
||||
throw new Exception("#This string has punctuation at both ends&");
|
||||
if (GetParamCase("軟件 測試") != "軟件-測試")
|
||||
throw new Exception("軟件 測試");
|
||||
if (GetParamCase("実験 試し") != "実験-試し")
|
||||
throw new Exception("実験 試し");
|
||||
if (GetParamCase("יקספּערמענאַל פּרובירן") != "יקספּערמענאַל-פּרובירן")
|
||||
throw new Exception("יקספּערמענאַל פּרובירן");
|
||||
if (GetParamCase("я надеюсь, что это сработает") != "я-надеюсь-что-это-сработает")
|
||||
throw new Exception("я надеюсь, что это сработает");
|
||||
}
|
||||
|
||||
internal static void SetMetadata(ILogger log, AppSettings appSettings, string sourceDirectory)
|
||||
{
|
||||
bool? match;
|
||||
|
Reference in New Issue
Block a user