-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
44 lines (40 loc) · 1011 Bytes
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
#ifdef _WIN32
#include <fxc/fxc>
#endif
#include <npl/npl>
#include <cvl/cvl>
#include <osl/lcs>
void show_usage(void);
int main(int argc, char *argv[]) {
auto arguments = osl::GetArgumentsVector(argc, argv);
if (!arguments.size()) {
show_usage();
return 0;
}
osl::log::SetLogLevel(osl::log::info);
osl::log::SetLogSink<std::string>(
[](int level, int key, auto log) {
std::cout << log << std::endl;
});
npl::make_dispatcher();
auto ns = arguments[0];
#ifdef _WIN32
if (ns == "fxc") {
fxc::entry(arguments);
} else
#endif
if (ns == "npl") {
npl::entry(arguments);
} else if (ns == "cvl") {
cvl::entry(arguments);
} else if (ns == "osl") {
osl::lcs_tests();
} else {
show_usage();
}
return 0;
}
void show_usage(void) {
std::cout << "test npl ftp <host> <port> <user> <pass>" << std::endl;
}