From eadd7794d7176e12f88707036858d68ee8db6dea Mon Sep 17 00:00:00 2001 From: kkm Date: Thu, 9 Jul 2015 16:10:16 -0700 Subject: [PATCH] Changed per the discussion at https://github.com/kaldi-asr/kaldi/pull/3 --- src/util/kaldi-io-test.cc | 5 +++++ src/util/kaldi-table-test.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/util/kaldi-io-test.cc b/src/util/kaldi-io-test.cc index d0b8ffd3..b8b8c474 100644 --- a/src/util/kaldi-io-test.cc +++ b/src/util/kaldi-io-test.cc @@ -161,8 +161,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 d191322f..8de78d66 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 }