]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
changed test for new syntax 630/head
authorYann Collet <cyan@fb.com>
Sat, 25 Mar 2017 01:36:56 +0000 (18:36 -0700)
committerYann Collet <cyan@fb.com>
Sat, 25 Mar 2017 01:36:56 +0000 (18:36 -0700)
--dictID= and --maxdict=

lib/dictBuilder/zdict.c
tests/playTests.sh

index 0824b94d1c0a0cea873c4e93cf705c97a3541e3f..6bc42526af2db821b9c7bcb78f4f491c2103d965 100644 (file)
@@ -427,7 +427,7 @@ static void ZDICT_insertDictItem(dictItem* table, U32 maxSize, dictItem elt)
 {
     /* merge if possible */
     U32 mergeId = ZDICT_tryMerge(table, elt, 0);
-    if (mergeId) {
+    if (mergeId) {  /* recursive : re-merge the newly merged elt */
         U32 newMerge = 1;
         while (newMerge) {
             newMerge = ZDICT_tryMerge(table, table[mergeId], mergeId);  /* merge existing elt */
index 897a901554cf733d0beaf7bf15f370ed78e7b32c..5abbb14e3bc269bea71e8e0f3b85878e45b4c4b8 100755 (executable)
@@ -253,12 +253,12 @@ $ECHO "- Create second (different) dictionary "
 $ZSTD --train *.c ../programs/*.c ../programs/*.h -o tmpDictC
 $ZSTD -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
 $ECHO "- Create dictionary with short dictID"
-$ZSTD --train *.c ../programs/*.c --dictID 1 -o tmpDict1
+$ZSTD --train *.c ../programs/*.c --dictID=1 -o tmpDict1
 cmp tmpDict tmpDict1 && die "dictionaries should have different ID !"
 $ECHO "- Create dictionary with wrong dictID parameter order (must fail)"
 $ZSTD --train *.c ../programs/*.c --dictID -o 1 tmpDict1 && die "wrong order : --dictID must be followed by argument "
 $ECHO "- Create dictionary with size limit"
-$ZSTD --train *.c ../programs/*.c -o tmpDict2 --maxdict 4K -v
+$ZSTD --train *.c ../programs/*.c -o tmpDict2 --maxdict=4K -v
 $ECHO "- Create dictionary with wrong parameter order (must fail)"
 $ZSTD --train *.c ../programs/*.c -o tmpDict2 --maxdict -v 4K && die "wrong order : --maxdict must be followed by argument "
 $ECHO "- Compress without dictID"
@@ -303,10 +303,10 @@ $ECHO "- Create second (different) dictionary"
 $ZSTD --train --cover=k=56,d=8 *.c ../programs/*.c ../programs/*.h -o tmpDictC
 $ZSTD -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
 $ECHO "- Create dictionary with short dictID"
-$ZSTD --train --cover=k=46,d=8 *.c ../programs/*.c --dictID 1 -o tmpDict1
+$ZSTD --train --cover=k=46,d=8 *.c ../programs/*.c --dictID=1 -o tmpDict1
 cmp tmpDict tmpDict1 && die "dictionaries should have different ID !"
 $ECHO "- Create dictionary with size limit"
-$ZSTD --train --optimize-cover=steps=8 *.c ../programs/*.c -o tmpDict2 --maxdict 4K
+$ZSTD --train --optimize-cover=steps=8 *.c ../programs/*.c -o tmpDict2 --maxdict=4K
 rm tmp*