new for loop successfull tested

master
Marc Wäckerlin 9 years ago
parent da6971ad0e
commit 91a8f753c6
  1. 33
      examples/SwissSign_Silver_CA_-_G2.pem
  2. 25
      examples/ca.pem
  3. 18
      examples/client.key
  4. 20
      examples/client.pem
  5. 9
      examples/makefile.am
  6. 28
      examples/test-commands.wt
  7. 4
      src/commands.hxx

@ -1,33 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE
BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu
IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow
RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY
U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv
Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br
YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF
nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH
6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt
eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/
c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ
MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+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G1IyqG9tEXOgmtFZzit8xsfzcovMQv26yCgtlxiSSalP
HFfvZ7K3AIdT5JmoImzQv4RHMCYKTFjMTLdkAzHt2KOTQ7lpH3pueV0szLYYAlPB
Y13yN1C+NEK4gB3EqDSOv5PH4VBcujRK+gwrAgMBAAEwDQYJKoZIhvcNAQELBQAD
ggEBALRENDQLg2shfXSW4xG/oPad4XaFMLeynS9pQgX2+uHUYdb4m1c/fhCv9mXl
Y5Cj0zgFcO5ugvE91OiYog+9AZ/W/LAvD883IeQkUW2VVHXP1uKt4a2Ru1WQj6vV
79WEvQj5YaX9PP2pgRzeTXnASYrk3apfcx2D6ZZDICzpQLVaWQWyXXe43KG8JvvS
uuCOw7f1fuAZfa6LyKeisUBf0tX1Ow8NeYJqJ12Vuesk+E7Tw98oUEffnps7rOnA
eJilOOEcQYmjTdO2RfUVGRBoWIDeyivsMU3p0lNuQrjZaxewUjmIt+n/ZYFYd7yr
EjI+25K++7QCVDGKT/X4Rddoc3o=
-----END CERTIFICATE-----

@ -15,7 +15,10 @@ TEST_EXTENSIONS = .wt
WT_LOG_COMPILER = ${top_builddir}/src/webrunner WT_LOG_COMPILER = ${top_builddir}/src/webrunner
AM_WT_LOG_FLAGS = -x test-output.xml -p ${srcdir} AM_WT_LOG_FLAGS = -x test-output.xml -p ${srcdir}
EXTRA_DIST = ${TESTS} SwissSign_Silver_CA_-_G2.pem EXTRA_DIST = ${TESTS} ca.pem client.pem client.key
CLEANFILES = test-output.xml attachments maintainer-clean-local:
MAINTAINERCLEANFILES = makefile.in attachments -rm -r attachments
CLEANFILES = test-output.xml
MAINTAINERCLEANFILES = makefile.in

@ -6,7 +6,7 @@ testcase Test Certificate Load
# Load a SwissSign root certificate, so that it is accepted in the # Load a SwissSign root certificate, so that it is accepted in the
# following tests. Normally this is only necessary if you use # following tests. Normally this is only necessary if you use
# self-signed certificates, that are unknown by qt. # self-signed certificates, that are unknown by qt.
ca-certificate SwissSign_Silver_CA_-_G2.pem ca-certificate ca.pem
testcase Test Variable Definition testcase Test Variable Definition
# set a variable to a value # set a variable to a value
@ -62,4 +62,28 @@ clicktype javascript
testcase Test Load Client Certificate testcase Test Load Client Certificate
# define a client certificate to authenticate to a server # define a client certificate to authenticate to a server
#client-certificate certfile.pem keyfile.pem mypassword client-certificate client.pem client.key password
testcase Test For Loop
# test the for loop feature
# first run with a gven list
execute bash
echo -n "test:" > testfile
for VAR -> 1, 2, 3, 4
execute bash
echo -n "-VAR;">> testfile
set RESULT
execute bash
cat testfile
rm testfile
check RESULT = test:-1;-2;-3;-4;
# then run with a given global value
set VAR = 5, 6, 7, 8, 9
for VAR
execute bash
echo -n "-VAR;">> testfile
set RESULT
execute bash
cat testfile
rm testfile
check RESULT = -5;-6;-7;-8;-9;

@ -178,6 +178,7 @@ class Command: public QObject {
return commands; return commands;
} }
QStringList commaSeparatedList(QString value) { QStringList commaSeparatedList(QString value) {
value=value.trimmed();
if (!value.size()) return QStringList(); if (!value.size()) return QStringList();
switch (value.size()>1&&value.at(0)==value.at(value.size()-1) switch (value.size()>1&&value.at(0)==value.at(value.size()-1)
?value.at(0).toLatin1():'\0') { ?value.at(0).toLatin1():'\0') {
@ -1830,7 +1831,8 @@ class ClientCertificate: public Command {
if (cert.isNull()) throw NotACertificate(filename); if (cert.isNull()) throw NotACertificate(filename);
sslConfig.setLocalCertificate(cert); sslConfig.setLocalCertificate(cert);
filename = script->replacevars(_keyfile); filename = script->replacevars(_keyfile);
QFile keyfile(filename); QFile keyfile(script->path()+filename);
if (!keyfile.exists()) keyfile.setFileName(filename);
if (!keyfile.exists() || !keyfile.open(QIODevice::ReadOnly)) if (!keyfile.exists() || !keyfile.open(QIODevice::ReadOnly))
throw FileNotFound(filename); throw FileNotFound(filename);
keyfile.open(QIODevice::ReadOnly); keyfile.open(QIODevice::ReadOnly);

Loading…
Cancel
Save