aboutsummaryrefslogtreecommitdiffstats
path: root/test/cipherpack
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-07-07 14:48:55 +0200
committerSven Gothel <[email protected]>2022-07-07 14:48:55 +0200
commit71b36cd785629684c17cf721b3b4f6964c7f31a7 (patch)
treefe6044c8e5482c6dd2214627729af6aa5a3e4021 /test/cipherpack
parentec78ec696f39b990188595c18d4c65ace2746133 (diff)
Adopt to jaulib v0.13.1-81-g2ebef56 changes: CPUtils migration, package relocation
Diffstat (limited to 'test/cipherpack')
-rw-r--r--test/cipherpack/test_01_cipherpack.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/test/cipherpack/test_01_cipherpack.cpp b/test/cipherpack/test_01_cipherpack.cpp
index d6967d5..4c719d0 100644
--- a/test/cipherpack/test_01_cipherpack.cpp
+++ b/test/cipherpack/test_01_cipherpack.cpp
@@ -106,15 +106,21 @@ class Test01Cipherpack : public TestData {
}
~Test01Cipherpack() {
- std::system("killall mini_httpd");
+ if( jau::io::uri_tk::protocol_supported("http:") ) {
+ int res = std::system("killall mini_httpd");
+ (void)res;
+ }
}
static void httpd_start() {
- std::system("killall mini_httpd");
- const std::string cwd = jau::fs::get_cwd();
- const std::string cmd = "/usr/sbin/mini_httpd -p 8080 -l "+cwd+"/mini_httpd.log";
- jau::PLAIN_PRINT(true, "%s", cmd.c_str());
- std::system(cmd.c_str());
+ if( jau::io::uri_tk::protocol_supported("http:") ) {
+ int res = std::system("killall mini_httpd");
+ const std::string cwd = jau::fs::get_cwd();
+ const std::string cmd = "/usr/sbin/mini_httpd -p 8080 -l "+cwd+"/mini_httpd.log";
+ jau::PLAIN_PRINT(true, "%s", cmd.c_str());
+ res = std::system(cmd.c_str());
+ (void)res;
+ }
}
void test01_enc_dec_file_ok() {
@@ -220,7 +226,7 @@ class Test01Cipherpack : public TestData {
}
void test11_dec_http_ok() {
- if( !jau::io::uri::protocol_supported("http") ) {
+ if( !jau::io::uri_tk::protocol_supported("http:") ) {
jau::PLAIN_PRINT(true, "http not supported, abort\n");
return;
}
@@ -272,7 +278,7 @@ class Test01Cipherpack : public TestData {
}
void test12_dec_http_ok() {
- if( !jau::io::uri::protocol_supported("http") ) {
+ if( !jau::io::uri_tk::protocol_supported("http:") ) {
jau::PLAIN_PRINT(true, "http not supported, abort\n");
return;
}
@@ -306,7 +312,7 @@ class Test01Cipherpack : public TestData {
}
void test13_dec_http_error() {
- if( !jau::io::uri::protocol_supported("http") ) {
+ if( !jau::io::uri_tk::protocol_supported("http:") ) {
jau::PLAIN_PRINT(true, "http not supported, abort\n");
return;
}