diff --git a/src/util/kaldi-io-test.cc b/src/util/kaldi-io-test.cc index 0de27ace531..97e3690294b 100644 --- a/src/util/kaldi-io-test.cc +++ b/src/util/kaldi-io-test.cc @@ -162,8 +162,13 @@ void UnitTestIoNew(bool binary) { void UnitTestIoPipe(bool binary) { // This is as UnitTestIoNew except with different filenames. { +#if defined(_MSC_VER) && !defined(KALDI_CYGWIN_COMPAT) + const char *filename_out = "|copy /b con tmpf.gz", + *filename_in = "copy /b tmpf.gz con|"; +#else const char *filename_out = "|gzip -c > tmpf.gz", *filename_in = "gunzip -c tmpf.gz |"; +#endif Output ko(filename_out, binary); std::ostream &outfile = ko.Stream(); diff --git a/src/util/kaldi-table-test.cc b/src/util/kaldi-table-test.cc index d191322f951..8de78d6643d 100644 --- a/src/util/kaldi-table-test.cc +++ b/src/util/kaldi-table-test.cc @@ -57,6 +57,7 @@ void UnitTestReadScriptFile() { // suppress the warning since I already checked it's OK. KALDI_ASSERT(!ReadScriptFile(ss, false, &script)); } +#if !defined(_MSC_VER) || defined(KALDI_CYGWIN_COMPAT) { Output ko("| gzip -c > tmpf.gz", false); // text mode. ko.Stream() << "a b\n"; @@ -83,6 +84,7 @@ void UnitTestReadScriptFile() { KALDI_ASSERT(!ans); } unlink("tmpf.gz"); +#endif }