projects\fuzzer_VS2012_%PLATFORM%_Release.exe %FUZZERTEST% &&
projects\fuzzer_VS2013_%PLATFORM%_Release.exe %FUZZERTEST% &&
projects\fuzzer_VS2015_%PLATFORM%_Release.exe %FUZZERTEST% &&
- zstd_VS2015_%PLATFORM%_Release.exe
+ REM zstd_VS2015_%PLATFORM%_Release.exe
)
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
# include <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _isatty */
-# define SET_BINARY_MODE(file) { int unused = _setmode(_fileno(file), _O_BINARY); (void)unused; }
+# define SET_BINARY_MODE(file) { if (_setmode(_fileno(file), _O_BINARY) == -1) perror("Cannot set _O_BINARY"); }
#else
# include <unistd.h> /* isatty */
# define SET_BINARY_MODE(file)
if (!strcmp(suffix, stdoutmark)) {
unsigned u;
ress.dstFile = stdout;
+ SET_BINARY_MODE(stdout);
for (u=0; u<nbFiles; u++)
missed_files += FIO_compressFilename_srcFile(ress, stdoutmark,
inFileNamesTable[u], compressionLevel);
[ -n "$ZSTD" ] || die "ZSTD variable must be defined!"
-echo "\n**** simple tests **** "
+echo -e "\n**** simple tests **** "
./datagen > tmp
$ZSTD -f tmp # trivial compression case, creates tmp.zst
$ZSTD -df tmp.zst # trivial decompression case (overwrites tmp)
$ZSTD -df tmp2.zst && die "should have failed : wrong format"
rm tmp2.zst
-echo "\n**** frame concatenation **** "
+echo -e "\n**** frame concatenation **** "
echo "hello " > hello.tmp
echo "world!" > world.tmp
echo frame concatenation test completed
-echo "\n**** dictionary tests **** "
+echo -e "\n**** dictionary tests **** "
./datagen > tmpDict
./datagen -g1M | md5sum > tmp1
fc xxhash.c result
-echo "\n**** multiple files tests **** "
+echo -e "\n**** multiple files tests **** "
./datagen -s1 > tmp1 2> /dev/null
./datagen -s2 -g100K > tmp2 2> /dev/null
ls -ls tmp*
echo "decompress tmpall* into stdout > tmpdec : "
cp tmpall tmpall2
-# $ZSTD -dc tmpall* > tmpdec
+$ZSTD -dc tmpall* > tmpdec
ls -ls tmp*
echo "compress multiple files including a missing one (notHere) : "
$ZSTD -f tmp1 notHere tmp2 && die "missing file not detected!"
-echo "\n**** integrity tests **** "
+echo -e "\n**** integrity tests **** "
echo "test one file (tmp1.zst) "
$ZSTD -t tmp1.zst
$ZSTD --test tmp1.zst
echo "test good and bad files (*) "
$ZSTD -t * && die "bad files not detected !"
-echo "\n**** zstd round-trip tests **** "
+echo -e "\n**** zstd round-trip tests **** "
roundTripTest
roundTripTest -g15K # TableID==3
* OS-specific Includes
**************************************/
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
-# include <fcntl.h> /* _O_BINARY */
-# include <io.h> /* _setmode, _isatty */
-# define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY)
+# include <io.h> /* _isatty */
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#else
extern int fileno(FILE *stream); /* triggers fileno() within <stdio.h> on POSIX */
# include <unistd.h> /* isatty */
-# define SET_BINARY_MODE(file)
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
#endif