aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/pelletier/go-toml/fuzz.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/pelletier/go-toml/fuzz.sh')
-rwxr-xr-xvendor/github.com/pelletier/go-toml/fuzz.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/pelletier/go-toml/fuzz.sh b/vendor/github.com/pelletier/go-toml/fuzz.sh
new file mode 100755
index 0000000..3204b4c
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/fuzz.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+set -eu
+
+go get github.com/dvyukov/go-fuzz/go-fuzz
+go get github.com/dvyukov/go-fuzz/go-fuzz-build
+
+if [ ! -e toml-fuzz.zip ]; then
+ go-fuzz-build github.com/pelletier/go-toml
+fi
+
+rm -fr fuzz
+mkdir -p fuzz/corpus
+cp *.toml fuzz/corpus
+
+go-fuzz -bin=toml-fuzz.zip -workdir=fuzz