Skip to content

Commit f470ba9

Browse files
committed
comment //winonly for tests (excludes test from testing in mono)
1 parent 811ee7b commit f470ba9

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

CodeCompletion/readme.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

TestSuite/assemblies1.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//winonly
12
{$reference 'System.Windows.Forms.dll'}
23
{$reference 'System.Drawing.dll'}
34
{$reference 'System.Xml.dll'}

TestSuite/symbol_table_test.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//winonly
12
uses System, System.Windows, System.Collections, System.Collections.Generic;
23

34
begin

bin/TestRunner.exe

-512 Bytes
Binary file not shown.

bin/TestRunner.pas

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
var TestSuiteDir: string;
1212
var PathSeparator: string := Path.DirectorySeparatorChar;
1313

14+
function IsUnix: boolean;
15+
begin
16+
Result := (System.Environment.OSVersion.Platform = System.PlatformID.Unix) or (System.Environment.OSVersion.Platform = System.PlatformID.MacOSX);
17+
end;
18+
1419
function GetTestSuiteDir: string;
1520
begin
1621
var dir := Path.GetDirectoryName(GetEXEFileName());
@@ -32,6 +37,9 @@ procedure CompileErrorTests(withide: boolean);
3237
var files := Directory.GetFiles(TestSuiteDir+PathSeparator+'errors','*.pas');
3338
for var i := 0 to files.Length - 1 do
3439
begin
40+
var content := &File.ReadAllText(files[i]);
41+
if content.StartsWith('//winonly') and IsUnix then
42+
continue;
3543
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
3644
co.Debug := true;
3745
co.OutputDirectory := TestSuiteDir+PathSeparator+'errors';
@@ -63,6 +71,9 @@ procedure CompileAllRunTests(withdll: boolean; only32bit: boolean := false);
6371
var files := Directory.GetFiles(TestSuiteDir,'*.pas');
6472
for var i := 0 to files.Length - 1 do
6573
begin
74+
var content := &File.ReadAllText(files[i]);
75+
if content.StartsWith('//winonly') and IsUnix then
76+
continue;
6677
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
6778
co.Debug := true;
6879
co.OutputDirectory := TestSuiteDir+PathSeparator+'exe';
@@ -91,6 +102,9 @@ procedure CompileAllCompilationTests(dir: string; withdll: boolean);
91102
var files := Directory.GetFiles(TestSuiteDir+PathSeparator+dir,'*.pas');
92103
for var i := 0 to files.Length - 1 do
93104
begin
105+
var content := &File.ReadAllText(files[i]);
106+
if content.StartsWith('//winonly') and IsUnix then
107+
continue;
94108
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
95109
co.Debug := true;
96110
co.OutputDirectory := TestSuiteDir+PathSeparator+dir;
@@ -117,6 +131,9 @@ procedure CompileAllUnits;
117131
var dir := TestSuiteDir+PathSeparator+'units'+PathSeparator;
118132
for var i := 0 to files.Length - 1 do
119133
begin
134+
var content := &File.ReadAllText(files[i]);
135+
if content.StartsWith('//winonly') and IsUnix then
136+
continue;
120137
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
121138
co.Debug := true;
122139
co.OutputDirectory := dir;
@@ -142,6 +159,9 @@ procedure CompileAllUsesUnits;
142159
var files := Directory.GetFiles(TestSuiteDir+PathSeparator+'usesunits','*.pas');
143160
for var i := 0 to files.Length - 1 do
144161
begin
162+
var content := &File.ReadAllText(files[i]);
163+
if content.StartsWith('//winonly') and IsUnix then
164+
continue;
145165
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
146166
co.Debug := true;
147167
co.OutputDirectory := TestSuiteDir+PathSeparator+'exe';

0 commit comments

Comments
 (0)