@@ -15,43 +15,43 @@ module Program
1515 {
1616 when (args.Length != 1 )
1717 Prompt(1 );
18-
18+
1919 def path = args[0 ];
20-
20+
2121 when (!Directory.Exists(path))
2222 Prompt(2 );
2323
2424 def configPath = Path.Combine(path, " config.xml" );
25-
25+
2626 when (!File.Exists(configPath))
2727 Prompt(3 );
2828
2929 def dirs = Directory.GetDirectories(path);
30-
30+
3131 mutable totalConverted = 0 ;
32-
32+
3333 foreach (dir in dirs)
3434 {
3535 def testName = Path.GetFileNameWithoutExtension(dir);
3636 def projectPath = Path.Combine(dir, testName);
37-
37+
3838 when (Directory.Exists(projectPath))
3939 {
4040 Error($<#Can' t create dirrectory for ' $testName' test. The dirrectory ' $projectPath' allredy exists.#>);
4141 continue;
4242 }
43-
43+
4444 _ = Directory.CreateDirectory(projectPath);
45-
45+
4646 def files = Enumerable.Concat(Directory.EnumerateFiles(dir, "*.test"), Directory.EnumerateFiles(dir, "*.gold"));
4747 foreach (file in files)
4848 File.Move(file, Path.Combine(projectPath, Path.GetFileName(file)));
49-
49+
5050 totalConverted++;
5151 }
52-
52+
5353 def files = Directory.GetFiles(path, "*.test");
54-
54+
5555 foreach (file in files)
5656 {
5757 def testName = Path.GetFileNameWithoutExtension(file);
@@ -61,27 +61,27 @@ module Program
6161 Error($<#Can' t create dirrectory for ' $testName' test. The dirrectory ' $solutionPath' allredy exists.#>);
6262 continue;
6363 }
64-
64+
6565 _ = Directory.CreateDirectory(solutionPath);
6666 def projectPath = Path.Combine(solutionPath, testName);
6767 _ = Directory.CreateDirectory(projectPath);
68-
68+
6969 def destTestFilePath = Path.Combine(projectPath, testName) + " .test" ;
7070 File.Move(file, destTestFilePath);
71-
71+
7272 def destGoldFilePath = Path.Combine(projectPath, testName) + " .gold" ;
7373 def goldPath = Path.ChangeExtension(file, " .gold" );
7474 when (File.Exists(goldPath))
7575 File.Move(goldPath, destGoldFilePath);
76-
76+
7777 totalConverted++ ;
7878 }
7979
8080 def totalTests = dirs.Length + files.Length;
8181 WriteLine($" Converted $totalConverted of $totalTests tests." );
8282 0 ;
8383 }
84-
84+
8585 Prompt(errorNum : int = 0 ) : void
8686 {
8787 WriteLine(<#usings: TestsConverter.exe " path to test-suit folder" #>);
0 commit comments