@@ -70,6 +70,7 @@ TTestStartUpParameter = class(TTestCase)
7070 procedure TearDown ; override;
7171 published
7272 procedure Test_Create_Empty_DHT_torrent ;
73+ procedure Test_Tracker_UserInput_Without_Announce_Exit_Code ;
7374 procedure Test_Create_Simple_Filled_torrent ;
7475 procedure Test_Create_Filled_And_Empty_Torrent_All_Mode ;
7576
@@ -297,14 +298,51 @@ procedure TTestStartUpParameter.Test_Paramater_Ux(TrackerListOrder: TTrackerList
297298end ;
298299
299300procedure TTestStartUpParameter.Test_Create_Empty_DHT_torrent ;
301+ var
302+ TrackerListOrder: TTrackerListOrder;
300303begin
301- CreateEmptyTorrent(tloInsertNewBeforeAndKeepNewIntact);
302- TestEmptyTorrentResult;
304+ // Test if all the tracker update mode is working
305+ for TrackerListOrder in TTrackerListOrder do
306+ begin
307+ CreateEmptyTorrent(TrackerListOrder);
308+ TestEmptyTorrentResult;
309+ // check the exit code
310+ CheckEquals(0 , FExitCode);
311+ end ;
312+ end ;
313+
314+ procedure TTestStartUpParameter.Test_Tracker_UserInput_Without_Announce_Exit_Code ;
315+ var
316+ TrackerListOrder: TTrackerListOrder;
317+ begin
318+ // Test if all the tracker update mode is working
319+ for TrackerListOrder in TTrackerListOrder do
320+ begin
321+
322+ // add a wrong tracker without /announce
323+ FVerifyTrackerResult.TrackerAdded.Clear;
324+ FVerifyTrackerResult.TrackerAdded.Add(' udp://test.com' );
325+
326+ FVerifyTrackerResult.TrackerAdded.SaveToFile(FFullPathToEndUser +
327+ FILE_NAME_ADD_TRACKERS);
328+
329+ // Generate the command line parameter
330+ TestParameter(TrackerListOrder);
331+
332+ // call the tracker editor exe file
333+ CallExecutableFile;
334+
335+ // check the exit code. Must be an error
336+ CheckNotEquals(0 , FExitCode);
337+ end ;
303338end ;
304339
305340procedure TTestStartUpParameter.Test_Create_Simple_Filled_torrent ;
306341begin
307342 CreateFilledTorrent(tloInsertNewBeforeAndKeepNewIntact);
343+
344+ // check the exit code
345+ CheckEquals(0 , FExitCode);
308346end ;
309347
310348procedure TTestStartUpParameter.Test_Create_Filled_And_Empty_Torrent_All_Mode ;
@@ -324,8 +362,14 @@ procedure TTestStartUpParameter.Test_Create_Filled_And_Empty_Torrent_All_Mode;
324362 continue;
325363
326364 CreateEmptyTorrent(TrackerListOrder);
365+ // check the exit code
366+ CheckEquals(0 , FExitCode);
367+
327368 TestEmptyTorrentResult;
369+
328370 CreateFilledTorrent(TrackerListOrder);
371+ // check the exit code
372+ CheckEquals(0 , FExitCode);
329373 end ;
330374end ;
331375
0 commit comments