Explorar o código

* Merging revisions 43035 from trunk:
------------------------------------------------------------------------
r43035 | michael | 2019-09-19 09:40:26 +0200 (Thu, 19 Sep 2019) | 1 line

* Added test for bug ID #36086 (lookup on empty dataset)
------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@43242 -

michael %!s(int64=6) %!d(string=hai) anos
pai
achega
b23d37325b
Modificáronse 1 ficheiros con 17 adicións e 0 borrados
  1. 17 0
      packages/fcl-db/tests/testspecifictbufdataset.pas

+ 17 - 0
packages/fcl-db/tests/testspecifictbufdataset.pas

@@ -53,6 +53,7 @@ type
     procedure TestAutoIncFieldStreamingXML;
     procedure TestAutoIncFieldStreamingXML;
     Procedure TestLocateScrollEventCount;
     Procedure TestLocateScrollEventCount;
     Procedure TestLookupScrollEventCount;
     Procedure TestLookupScrollEventCount;
+    procedure TestLookupEmpty;
     Procedure TestRecordCount;
     Procedure TestRecordCount;
     Procedure TestClear;
     Procedure TestClear;
     procedure TestCopyFromDataset; //is copied dataset identical to original?
     procedure TestCopyFromDataset; //is copied dataset identical to original?
@@ -304,6 +305,22 @@ begin
 end;
 end;
 
 
 
 
+procedure TTestSpecificTBufDataset.TestLookupEmpty;
+
+// Test for issue 36086
+
+Var
+  V : Variant;
+
+begin
+  with DBConnector.GetNDataset(0) as TBufDataset do
+    begin
+    Open;
+    V:=Lookup('ID',5,'NAME');
+    AssertTrue('Null',Null=V);
+    end;
+end;
+
 procedure TTestSpecificTBufDataset.TestLookupScrollEventCount;
 procedure TTestSpecificTBufDataset.TestLookupScrollEventCount;
 
 
 Var
 Var