Last change
on this file since 4272 was
4272,
checked in by Sam Hocevar, 11 years ago
|
Rename check-flag-# tests to check-zzuf-#-#### with the option's long name,
to avoid problems with case-insensitive filesystems.
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # check-zzuf-A-autoinc - test "zzuf -A" flag (auto-increment) |
---|
4 | # Copyright (c) 2008-2010 Sam Hocevar <sam@hocevar.net> |
---|
5 | # All Rights Reserved |
---|
6 | # |
---|
7 | # This program is free software. It comes without any warranty, to |
---|
8 | # the extent permitted by applicable law. You can redistribute it |
---|
9 | # and/or modify it under the terms of the Do What The Fuck You Want |
---|
10 | # To Public License, Version 2, as published by Sam Hocevar. See |
---|
11 | # http://sam.zoy.org/wtfpl/COPYING for more details. |
---|
12 | # |
---|
13 | |
---|
14 | . "$(dirname "$0")/functions.inc" |
---|
15 | |
---|
16 | start_test "zzuf -A test" |
---|
17 | |
---|
18 | # Check -A with no fuzzing: output must match |
---|
19 | new_test "zzuf -A -r0 zzcat file-random file-random" |
---|
20 | m1=$($ZZUF -m -r0 $ZZCAT "$DIR/file-random" "$DIR/file-random" | cut -f2 -d' ') |
---|
21 | m2=$($ZZUF -m -A -r0 $ZZCAT "$DIR/file-random" "$DIR/file-random" | cut -f2 -d' ') |
---|
22 | if [ "$m1" = "$m2" ]; then |
---|
23 | pass_test "ok" |
---|
24 | else |
---|
25 | fail_test "$m1 != $m2" |
---|
26 | fi |
---|
27 | |
---|
28 | # Check -A with fuzzing: output must be different |
---|
29 | new_test "zzuf -A -r0.1 zzcat file-random file-random" |
---|
30 | m1=$($ZZUF -m -r0.1 $ZZCAT "$DIR/file-random" "$DIR/file-random" | cut -f2 -d' ') |
---|
31 | m2=$($ZZUF -m -A -r0.1 $ZZCAT "$DIR/file-random" "$DIR/file-random" | cut -f2 -d' ') |
---|
32 | if [ "$m1" != "$m2" ]; then |
---|
33 | pass_test "ok" |
---|
34 | else |
---|
35 | fail_test "$m1 = $m2" |
---|
36 | fi |
---|
37 | |
---|
38 | stop_test |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.