diff --git a/test/test_cat.cc b/test/test_cat.cc index b33021c..1c2ac54 100755 --- a/test/test_cat.cc +++ b/test/test_cat.cc @@ -58,6 +58,8 @@ void test_buffer_growth_threaded_comm() } int main() { +#ifndef __USING_WINDOWS__ + // test_cat_pipe_redirection(); test_cat_send_terminate(); /* @@ -65,5 +67,8 @@ int main() { test_buffer_growth(); test_buffer_growth_threaded_comm(); */ + +#endif + return 0; } diff --git a/test/test_env.cc b/test/test_env.cc index 8b041fa..8a561d5 100644 --- a/test/test_env.cc +++ b/test/test_env.cc @@ -3,6 +3,8 @@ using namespace subprocess; +#ifndef __USING_WINDOWS__ + void test_env() { int st= Popen("./env_script.sh", environment{{ @@ -13,7 +15,11 @@ void test_env() assert (st == 0); } +#endif + int main() { +#ifndef __USING_WINDOWS__ test_env(); +#endif return 0; } diff --git a/test/test_subprocess.cc b/test/test_subprocess.cc index efd721d..01d258d 100755 --- a/test/test_subprocess.cc +++ b/test/test_subprocess.cc @@ -5,7 +5,7 @@ using namespace subprocess; void test_exename() { -#ifdef _MSC_VER +#ifdef __USING_WINDOWS__ auto ret = call({"--version"}, executable{"cmake"}, shell{false}); #else auto ret = call({"-l"}, executable{"ls"}, shell{false}); @@ -39,7 +39,7 @@ void test_easy_piping() void test_shell() { -#ifdef _MSC_VER +#ifdef __USING_WINDOWS__ auto obuf = check_output({"cmake", "--version"}, shell{false}); #else auto obuf = check_output({"ls", "-l"}, shell{false}); @@ -54,7 +54,7 @@ void test_sleep() while (p.poll() == -1) { std::cout << "Waiting..." << std::endl; -#ifdef _MSC_VER +#ifdef __USING_WINDOWS__ #else sleep(1); #endif