diff mbox series

[FFmpeg-devel,v1,3/3] avutil/tests: add more avstring test case for fate

Message ID 20200113134451.9511-3-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,v1,1/3] avutil/avstring: Fix warning: ISO C90 forbids mixed declarations and code
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Limin Wang Jan. 13, 2020, 1:44 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

One test case is different, before the patchset, it's:
"path" + "/" = "path/"
After applied the patchset, it's:
"path" + "/" = "path"

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavutil/tests/avstring.c | 3 +++
 tests/ref/fate/avstring    | 3 +++
 2 files changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/libavutil/tests/avstring.c b/libavutil/tests/avstring.c
index 887bd25..a94f7a5 100644
--- a/libavutil/tests/avstring.c
+++ b/libavutil/tests/avstring.c
@@ -76,6 +76,9 @@  int main(void)
     TEST_APPEND_PATH_COMPONENT(NULL, NULL, "(null)")
     TEST_APPEND_PATH_COMPONENT("path", NULL, "path");
     TEST_APPEND_PATH_COMPONENT(NULL, "comp", "comp");
+    TEST_APPEND_PATH_COMPONENT("path", "", "path");
+    TEST_APPEND_PATH_COMPONENT("", "comp", "comp");
+    TEST_APPEND_PATH_COMPONENT("path", "/", "path");
     TEST_APPEND_PATH_COMPONENT("path", "comp", "path/comp");
     TEST_APPEND_PATH_COMPONENT("path/", "comp", "path/comp");
     TEST_APPEND_PATH_COMPONENT("path", "/comp", "path/comp");
diff --git a/tests/ref/fate/avstring b/tests/ref/fate/avstring
index 1ca9be5..92ec918 100644
--- a/tests/ref/fate/avstring
+++ b/tests/ref/fate/avstring
@@ -29,6 +29,9 @@  Testing av_append_path_component()
 (null) = (null)
 path = path
 comp = comp
+path = path
+comp = comp
+path/ = path
 path/comp = path/comp
 path/comp = path/comp
 path/comp = path/comp