aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-10-30 22:02:10 +0100
committerDiego Biurrun <diego@biurrun.de>2012-10-12 20:56:54 +0200
commit9e6ea3cef9927be46973c8e972656b4264f8f1f6 (patch)
tree76c501c449fab05bd0f84ecc5c87537e2263e781 /tests
parent4c66af6141a0bb9e3132bc1105da7c9400602e00 (diff)
downloadffmpeg-9e6ea3cef9927be46973c8e972656b4264f8f1f6.tar.gz
fate: add avstring test
Diffstat (limited to 'tests')
-rw-r--r--tests/fate/libavutil.mak4
-rw-r--r--tests/ref/fate/avstring27
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak
index afb0a2c98b..54f5da3f4f 100644
--- a/tests/fate/libavutil.mak
+++ b/tests/fate/libavutil.mak
@@ -8,6 +8,10 @@ fate-aes: libavutil/aes-test$(EXESUF)
fate-aes: CMD = run libavutil/aes-test
fate-aes: REF = /dev/null
+FATE_LIBAVUTIL += fate-avstring
+fate-avstring: libavutil/avstring-test$(EXESUF)
+fate-avstring: CMD = run libavutil/avstring-test
+
FATE_LIBAVUTIL += fate-base64
fate-base64: libavutil/base64-test$(EXESUF)
fate-base64: CMD = run libavutil/base64-test
diff --git a/tests/ref/fate/avstring b/tests/ref/fate/avstring
new file mode 100644
index 0000000000..bc231e8148
--- /dev/null
+++ b/tests/ref/fate/avstring
@@ -0,0 +1,27 @@
+Testing av_get_token()
+|''| -> || + ||
+|| -> || + ||
+|:| -> || + |:|
+|\| -> |\| + ||
+|'| -> || + ||
+| '' :| -> || + |:|
+| '' '' :| -> | | + |:|
+|foo '' :| -> |foo | + |:|
+|'foo'| -> |foo| + ||
+|foo | -> |foo| + ||
+| ' foo ' | -> | foo | + ||
+|foo\| -> |foo\| + ||
+|foo': blah:blah| -> |foo: blah:blah| + ||
+|foo\: blah:blah| -> |foo: blah| + |:blah|
+|foo'| -> |foo| + ||
+|'foo : ' :blahblah| -> |foo : | + |:blahblah|
+|\ :blah| -> | | + |:blah|
+| foo| -> |foo| + ||
+| foo | -> |foo| + ||
+| foo \ | -> |foo | + ||
+|foo ':blah| -> |foo :blah| + ||
+| foo bar : blahblah| -> |foo bar| + |: blahblah|
+|\f\o\o| -> |foo| + ||
+|'foo : \ \ ' : blahblah| -> |foo : \ \ | + |: blahblah|
+|'\fo\o:': blahblah| -> |\fo\o:| + |: blahblah|
+|\'fo\o\:': foo ' :blahblah| -> |'foo:: foo | + |:blahblah|