changeset 115:5ed770c41a73

Change garbage input to invalid input. Fix InvalidInstructions test. InvalidInstructions test now fails as instruction validation is not yet implemented
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 21 Mar 2014 16:33:18 +0000
parents 447a7abee6c7
children 080660b2ce7d
files ui/tests/cinstprocesstest.cpp
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ui/tests/cinstprocesstest.cpp	Fri Mar 21 17:13:24 2014 +0100
+++ b/ui/tests/cinstprocesstest.cpp	Fri Mar 21 16:33:18 2014 +0000
@@ -77,11 +77,9 @@
         }
         retval = installerProcess->write(garbage, 1030);
         bytesWritten += retval;
-    } while (retval != -1 && bytesWritten < 100 *1024 *1024 );
+    } while (retval != -1 && bytesWritten < 15 *1024 *1024 );
 
-    QVERIFY (bytesWritten  < 100 *1024 *1024);
-
-    finishVerify(installerProcess, ERR_TOO_MUCH_INPUT);
+    finishVerify(installerProcess, ERR_INVALID_INPUT);
 }
 
 void CinstProcessTest::testNoInput() {
@@ -109,12 +107,12 @@
     QProcess* installerProcess = startCinstProcess();
     QVERIFY(installerProcess->state() == QProcess::Running);
 
-    /* foobar as instruction */
+    /* I: as instruction */
     installerProcess->write("-----BEGIN CERTIFICATE LIST-----\r\n");
     installerProcess->write(validList.rawData().toLatin1());
     installerProcess->write("-----END CERTIFICATE LIST-----\r\n");
 
-    installerProcess->write("foobar");
+    installerProcess->write("I:ABCDEF");
 
     finishVerify(installerProcess, ERR_INVALID_INSTRUCTIONS);
 }

http://wald.intevation.org/projects/trustbridge/