Skip to content

Commit 66356a9

Browse files
committed
Fix issue with missing . for test files
1 parent faa7987 commit 66356a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

TestSetup_Engine/Query/TestFiles.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,25 @@ public static partial class Query
1717
[Description("Returns .cs files to be tested. Prioritises files from input parameters. If non available, then all files of the specified format in the currently executing repo are extracted.")]
1818
public static List<string> TestFilesCs()
1919
{
20-
return TestFiles("cs");
20+
return TestFiles(".cs");
2121
}
2222

2323
/***************************************************/
2424

2525
[Description("Returns .csproj files to be tested. Prioritises files from input parameters. If non available, then all files of the specified format in the currently executing repo are extracted.")]
2626
public static List<string> TestFilesCsproj()
2727
{
28-
return TestFiles("csproj");
28+
return TestFiles(".csproj");
2929
}
3030

3131
/***************************************************/
3232

3333
[Description("Returns files of a specific type to be tested. Prioritises files from input parameters. If non available, then all files of the specified format in the currently executing repo are extracted.")]
3434
public static List<string> TestFiles(string fileEnding)
3535
{
36+
if(!fileEnding.StartsWith('.'))
37+
fileEnding = "." + fileEnding;
38+
3639
if (m_testFiles.TryGetValue(fileEnding, out List<string> files))
3740
return files;
3841

@@ -45,7 +48,7 @@ public static List<string> TestFiles(string fileEnding)
4548

4649
if (files == null)
4750
{
48-
files = Setup.Query.GetFiles(Setup.Query.CurrentRepoFolder(), $"*.{fileEnding}", true).ToList();
51+
files = Setup.Query.GetFiles(Setup.Query.CurrentRepoFolder(), $"*{fileEnding}", true).ToList();
4952
m_testFiles[fileEnding] = files;
5053
}
5154
return files;

0 commit comments

Comments
 (0)