kubo/test
Christian Couder 2489dfe8a9 ipfs-test-lib: fix test_fsh arg quoting
test_fsh() should quote its arguments before passing them
to `eval` otherwise there are problems when the arguments
contain spaces.

For example when running the following program:

```
#!/bin/sh

. ./ipfs-test-lib.sh

die () {
    printf >&2 "%s\n" "$@"
    exit 1
}

DIR1="test dir 1"
DIR2="test dir 2"

mkdir "$DIR1" "$DIR2" || die "Could not mkdir '$DIR1' '$DIR2'"

echo "in dir 1" >"$DIR1/file1" || die "Could not write into '$DIR1/file1'"
echo "in dir 2" >"$DIR2/file2" || die "Could not write into '$DIR2/file2'"

if test_cmp "$DIR1/file1" "$DIR2/file2"
then
    echo "test_cmp succeeded!"
else
    echo "test_cmp failed!"
fi

rm -rf "$DIR1" "$DIR2" || die "Could not rm -rf '$DIR1' '$DIR2'"

```

we get:

```
> diff -u test dir 1/file1 test dir 2/file2
diff: extra operand '1/file1'
diff: Try 'diff --help' for more information.

test_cmp failed!
```

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-08-15 12:10:15 +02:00
..
3nodetest docker: make dockerfile differences more obvious 2016-06-03 02:12:31 +02:00
api-startup misc: add test for api readiness 2015-02-15 04:41:18 -08:00
bench config: change default config dir name to .ipfs 2015-04-20 02:25:41 -07:00
bin Add regression sharness test for ipfs init 2016-06-13 13:09:52 +02:00
dependencies Replace existing iptb dependencies with the gx one 2016-04-30 07:17:36 +02:00
integration use batching datastore for providers storage 2016-07-26 10:48:25 -07:00
sharness commands: fix panic when stdin is empty for string args 2016-08-07 09:24:17 -07:00
supernode_client use batching datastore for providers storage 2016-07-26 10:48:25 -07:00
.gitignore test: add IPFS-BUILD-OPTIONS to .gitignore 2015-04-06 18:06:24 +02:00
ipfs-test-lib.sh ipfs-test-lib: fix test_fsh arg quoting 2016-08-15 12:10:15 +02:00
Makefile test: actually use downloaded gx binary, clean up obsolete variable 2016-07-08 21:36:38 +02:00
README.md test/README: update sharness test coverage 2015-04-02 11:56:49 +02:00
sharness_test_coverage_helper.sh coverage_helper: better group long and short options 2015-10-24 11:22:53 +02:00

Sharness test command coverage

Module Online Test Offline Test
object t0051 t0051
ls t0045 t0045
cat t0040
dht
bitswap
block t0050
daemon t0030 N/A
init N/A t0020
add t0040
config t0021 t0021
version t0060 t0010
ping
diag
mount t0030
name t0110 t0100
pin t0080
get t0090 t0090
refs t0080
repo gc t0080
id
bootstrap t0120 t0120
swarm
update
commands