From 428175944edaf675dfd5b4861f22f29e2036cd8d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 12 Nov 2015 13:06:14 +0200 Subject: [PATCH] New test cases. --HG-- branch : develop --- src/test/ValentinaTest/ValentinaTest.pro | 7 +++++-- src/test/ValentinaTest/tst_tape/text.vit | 0 src/test/ValentinaTest/tst_tape/text.vst | 0 src/test/ValentinaTest/tst_tapecommandline.cpp | 8 ++++++++ src/test/ValentinaTest/tst_valentina/text.val | 0 src/test/ValentinaTest/tst_valentinacommandline.cpp | 4 ++++ 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/test/ValentinaTest/tst_tape/text.vit create mode 100644 src/test/ValentinaTest/tst_tape/text.vst create mode 100644 src/test/ValentinaTest/tst_valentina/text.val diff --git a/src/test/ValentinaTest/ValentinaTest.pro b/src/test/ValentinaTest/ValentinaTest.pro index 3bde0a421..eeb5058d2 100644 --- a/src/test/ValentinaTest/ValentinaTest.pro +++ b/src/test/ValentinaTest/ValentinaTest.pro @@ -225,12 +225,15 @@ TAPE_TEST_FILES += \ tst_tape/broken1.vit \ tst_tape/broken2.vit \ tst_tape/broken3.vit \ - tst_tape/broken4.vit + tst_tape/broken4.vit \ + tst_tape/text.vit \ + tst_tape/text.vst VALENTINA_TEST_FILES += \ tst_valentina/empty.val \ tst_valentina/issue_372.val \ - tst_valentina/wrong_obj_type.val + tst_valentina/wrong_obj_type.val \ + tst_valentina/text.val # Compilation will fail without this files after we added them to this section. OTHER_FILES += \ diff --git a/src/test/ValentinaTest/tst_tape/text.vit b/src/test/ValentinaTest/tst_tape/text.vit new file mode 100644 index 000000000..e69de29bb diff --git a/src/test/ValentinaTest/tst_tape/text.vst b/src/test/ValentinaTest/tst_tape/text.vst new file mode 100644 index 000000000..e69de29bb diff --git a/src/test/ValentinaTest/tst_tapecommandline.cpp b/src/test/ValentinaTest/tst_tapecommandline.cpp index e0d1f6a56..3b72b91d5 100644 --- a/src/test/ValentinaTest/tst_tapecommandline.cpp +++ b/src/test/ValentinaTest/tst_tapecommandline.cpp @@ -114,6 +114,14 @@ void TST_TapeCommandLine::OpenMeasurements_data() const QTest::newRow("Broken file. Invalid measurement name.") << "broken4.vit" << false << V_EX_NOINPUT; + + QTest::newRow("Empty text VIT file.") << "text.vit" + << false + << V_EX_NOINPUT; + + QTest::newRow("Empty text VST file.") << "text.vst" + << false + << V_EX_NOINPUT; } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/test/ValentinaTest/tst_valentina/text.val b/src/test/ValentinaTest/tst_valentina/text.val new file mode 100644 index 000000000..e69de29bb diff --git a/src/test/ValentinaTest/tst_valentinacommandline.cpp b/src/test/ValentinaTest/tst_valentinacommandline.cpp index 47b6d26bf..6141e2d5b 100644 --- a/src/test/ValentinaTest/tst_valentinacommandline.cpp +++ b/src/test/ValentinaTest/tst_valentinacommandline.cpp @@ -75,6 +75,10 @@ void TST_ValentinaCommandLine::OpenPatterns_data() const QTest::newRow("File with invalid object type") << "wrong_obj_type.val" << false << V_EX_NOINPUT; + + QTest::newRow("Empty text VAL file") << "txt.val" + << false + << V_EX_NOINPUT; } //---------------------------------------------------------------------------------------------------------------------