diff --git a/.gitattributes b/.gitattributes
index d70a72cb65..7877d08d5a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3782,6 +3782,7 @@ test/bugs/testfileproc.pas svneol=native#text/plain
test/bugs/testfileutil.pas svneol=native#text/plain
test/bugtestcase.pas svneol=native#text/plain
test/hello.ahk svneol=native#text/plain
+test/lcltests/testpen.pas svneol=native#text/plain
test/lcltests/testunicode.pas svneol=native#text/plain
test/readme.txt svneol=native#text/plain
test/runtests.lpi svneol=native#text/plain
diff --git a/test/lcltests/testpen.pas b/test/lcltests/testpen.pas
new file mode 100644
index 0000000000..3ae2662d24
--- /dev/null
+++ b/test/lcltests/testpen.pas
@@ -0,0 +1,47 @@
+unit TestPen;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, fpcunit,
+ Interfaces, LCLType, LCLIntf,
+ testglobals;
+
+type
+
+ { TTestPen }
+
+ TTestPen = class(TTestCase)
+ published
+ procedure TestOne;
+ end;
+
+implementation
+
+{ TTestPen }
+
+procedure TTestPen.TestOne;
+var
+ APen: HPEN;
+ LP, Test: TLogPen;
+begin
+ LP.lopnColor := $FF0000;
+ LP.lopnStyle := PS_DASHDOTDOT;
+ LP.lopnWidth := Point(2, 0);
+ APen := CreatePenIndirect(LP);
+ AssertFalse('Creating of APen failed', APen = 0);
+ // APen created
+ AssertEquals('Wrong return value of GetObject(APen, 0, nil)',
+ SizeOf(TLogPen), GetObject(APen, 0, nil));
+ GetObject(APen, SizeOf(Test), @Test);
+ AssertTrue( 'Pens are not equal', CompareMem(@Test, @LP, SizeOf(TLogPen)));
+ DeleteObject(APen);
+end;
+
+initialization
+ AddToLCLTestSuite(TTestPen);
+
+end.
+
diff --git a/test/lcltests/testunicode.pas b/test/lcltests/testunicode.pas
index 4a5aef58a6..91be40b2c1 100644
--- a/test/lcltests/testunicode.pas
+++ b/test/lcltests/testunicode.pas
@@ -5,7 +5,7 @@ unit TestUnicode;
interface
uses
- Classes, SysUtils, fpcunit, testregistry, LCLProc, testglobals;
+ Classes, SysUtils, fpcunit, LCLProc, testglobals;
type
diff --git a/test/runtests.lpi b/test/runtests.lpi
index beff103dcb..92be06c1c5 100644
--- a/test/runtests.lpi
+++ b/test/runtests.lpi
@@ -35,7 +35,7 @@
-
+
@@ -61,6 +61,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/test/runtestsgui.lpi b/test/runtestsgui.lpi
index d009303971..2034074de0 100644
--- a/test/runtestsgui.lpi
+++ b/test/runtestsgui.lpi
@@ -35,7 +35,7 @@
-
+
@@ -76,6 +76,11 @@
+
+
+
+
+
diff --git a/test/testunits.pas b/test/testunits.pas
index b6f8314c3c..1531ef85d0 100644
--- a/test/testunits.pas
+++ b/test/testunits.pas
@@ -30,7 +30,7 @@ uses
TestLpi, BugTestCase,
bug8432, testfileutil, testfileproc,
// lcltests
- testunicode;
+ testunicode, testpen;
implementation