diff options
Diffstat (limited to 'xdelta3/xdelta3-test.h')
-rw-r--r-- | xdelta3/xdelta3-test.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/xdelta3/xdelta3-test.h b/xdelta3/xdelta3-test.h index d60bf2d..21d7283 100644 --- a/xdelta3/xdelta3-test.h +++ b/xdelta3/xdelta3-test.h | |||
@@ -144,6 +144,7 @@ static int do_cmd (xd3_stream *stream, const char *buf) | |||
144 | if (WIFEXITED (ret)) | 144 | if (WIFEXITED (ret)) |
145 | { | 145 | { |
146 | stream->msg = "command exited non-zero"; | 146 | stream->msg = "command exited non-zero"; |
147 | IF_DEBUG1 (DP(RINT "command was: %s\n", buf)); | ||
147 | } | 148 | } |
148 | else | 149 | else |
149 | { | 150 | { |
@@ -1894,15 +1895,11 @@ test_recode_command2 (xd3_stream *stream, int has_source, | |||
1894 | 1895 | ||
1895 | /* Check recode changes. */ | 1896 | /* Check recode changes. */ |
1896 | 1897 | ||
1897 | /* TODO! This test is broken! */ | ||
1898 | if ((ret = check_vcdiff_header (stream, | 1898 | if ((ret = check_vcdiff_header (stream, |
1899 | TEST_COPY_FILE, | 1899 | TEST_COPY_FILE, |
1900 | "VCDIFF window indicator", | 1900 | "VCDIFF window indicator", |
1901 | "VCD_SOURCE", | 1901 | "VCD_SOURCE", |
1902 | has_source))) | 1902 | has_source))) { return ret; } |
1903 | { | ||
1904 | DP(RINT "TEST IS BROKEN: %s\n", xd3_strerror (ret)); | ||
1905 | } | ||
1906 | 1903 | ||
1907 | if ((ret = check_vcdiff_header (stream, | 1904 | if ((ret = check_vcdiff_header (stream, |
1908 | TEST_COPY_FILE, | 1905 | TEST_COPY_FILE, |
@@ -2172,35 +2169,35 @@ test_source_decompression (xd3_stream *stream, int ignore) | |||
2172 | 2169 | ||
2173 | /* Now the two identical files are compressed. Delta-encode the target, | 2170 | /* Now the two identical files are compressed. Delta-encode the target, |
2174 | * with decompression. */ | 2171 | * with decompression. */ |
2175 | sprintf (buf, "%s -eq -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_TARGET_FILE, TEST_DELTA_FILE); | 2172 | sprintf (buf, "%s -v -eq -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_TARGET_FILE, TEST_DELTA_FILE); |
2176 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2173 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2177 | 2174 | ||
2178 | /* Decode the delta file with recompression disabled, should get an | 2175 | /* Decode the delta file with recompression disabled, should get an |
2179 | * uncompressed file out. */ | 2176 | * uncompressed file out. */ |
2180 | sprintf (buf, "%s -dq -R -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); | 2177 | sprintf (buf, "%s -v -dq -R -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); |
2181 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2178 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2182 | if ((ret = compare_files (stream, TEST_COPY_FILE, TEST_RECON_FILE))) { return ret; } | 2179 | if ((ret = compare_files (stream, TEST_COPY_FILE, TEST_RECON_FILE))) { return ret; } |
2183 | 2180 | ||
2184 | /* Decode the delta file with recompression, should get a compressed file | 2181 | /* Decode the delta file with recompression, should get a compressed file |
2185 | * out. But we can't compare compressed files directly. */ | 2182 | * out. But we can't compare compressed files directly. */ |
2186 | sprintf (buf, "%s -dqf -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); | 2183 | sprintf (buf, "%s -v -dqf -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); |
2187 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2184 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2188 | sprintf (buf, "%s %s < %s > %s", ext->decomp_cmdname, ext->decomp_options, TEST_RECON_FILE, TEST_RECON2_FILE); | 2185 | sprintf (buf, "%s %s < %s > %s", ext->decomp_cmdname, ext->decomp_options, TEST_RECON_FILE, TEST_RECON2_FILE); |
2189 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2186 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2190 | if ((ret = compare_files (stream, TEST_COPY_FILE, TEST_RECON2_FILE))) { return ret; } | 2187 | if ((ret = compare_files (stream, TEST_COPY_FILE, TEST_RECON2_FILE))) { return ret; } |
2191 | 2188 | ||
2192 | /* Encode with decompression disabled */ | 2189 | /* Encode with decompression disabled */ |
2193 | sprintf (buf, "%s -feqD -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_TARGET_FILE, TEST_DELTA_FILE); | 2190 | sprintf (buf, "%s -v -feqD -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_TARGET_FILE, TEST_DELTA_FILE); |
2194 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2191 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2195 | 2192 | ||
2196 | /* Decode the delta file with recompression enabled, it doesn't matter, | 2193 | /* Decode the delta file with recompression enabled, it doesn't matter, |
2197 | * should get the compressed file out. */ | 2194 | * should get the compressed file out. */ |
2198 | sprintf (buf, "%s -fdq -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); | 2195 | sprintf (buf, "%s -v -fdq -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); |
2199 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2196 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2200 | if ((ret = compare_files (stream, TEST_TARGET_FILE, TEST_RECON_FILE))) { return ret; } | 2197 | if ((ret = compare_files (stream, TEST_TARGET_FILE, TEST_RECON_FILE))) { return ret; } |
2201 | 2198 | ||
2202 | /* Try again with recompression disabled, it doesn't make a difference. */ | 2199 | /* Try again with recompression disabled, it doesn't make a difference. */ |
2203 | sprintf (buf, "%s -fqRd -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); | 2200 | sprintf (buf, "%s -v -fqRd -s%s %s %s", program_name, TEST_SOURCE_FILE, TEST_DELTA_FILE, TEST_RECON_FILE); |
2204 | if ((ret = do_cmd (stream, buf))) { return ret; } | 2201 | if ((ret = do_cmd (stream, buf))) { return ret; } |
2205 | if ((ret = compare_files (stream, TEST_TARGET_FILE, TEST_RECON_FILE))) { return ret; } | 2202 | if ((ret = compare_files (stream, TEST_TARGET_FILE, TEST_RECON_FILE))) { return ret; } |
2206 | test_cleanup(); | 2203 | test_cleanup(); |
@@ -2813,14 +2810,13 @@ xd3_selftest (void) | |||
2813 | DO_TEST (stdout_behavior, 0, 0); | 2810 | DO_TEST (stdout_behavior, 0, 0); |
2814 | DO_TEST (no_output, 0, 0); | 2811 | DO_TEST (no_output, 0, 0); |
2815 | DO_TEST (command_line_arguments, 0, 0); | 2812 | DO_TEST (command_line_arguments, 0, 0); |
2816 | // TODO BROKEN!! | ||
2817 | //DO_TEST (recode_command, 0, 0); | ||
2818 | 2813 | ||
2819 | #if EXTERNAL_COMPRESSION | 2814 | #if EXTERNAL_COMPRESSION |
2820 | DO_TEST (source_decompression, 0, 0); | 2815 | DO_TEST (source_decompression, 0, 0); |
2821 | DO_TEST (externally_compressed_io, 0, 0); | 2816 | DO_TEST (externally_compressed_io, 0, 0); |
2822 | #endif | 2817 | #endif |
2823 | 2818 | ||
2819 | DO_TEST (recode_command, 0, 0); | ||
2824 | #endif /* WIN32 */ | 2820 | #endif /* WIN32 */ |
2825 | 2821 | ||
2826 | IF_DJW (DO_TEST (secondary_huff, 0, DJW_MAX_GROUPS)); | 2822 | IF_DJW (DO_TEST (secondary_huff, 0, DJW_MAX_GROUPS)); |