diff --git a/tests/Makefile b/tests/Makefile
index 24680b8..5ded6a4 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -102,6 +102,7 @@ include $(SRC_PATH)/tests/fate/api.mak
 include $(SRC_PATH)/tests/fate/apng.mak
 include $(SRC_PATH)/tests/fate/atrac.mak
 include $(SRC_PATH)/tests/fate/audio.mak
+include $(SRC_PATH)/tests/fate/avs2.mak
 include $(SRC_PATH)/tests/fate/bmp.mak
 include $(SRC_PATH)/tests/fate/build.mak
 include $(SRC_PATH)/tests/fate/canopus.mak
diff --git a/tests/fate/avs2.mak b/tests/fate/avs2.mak
new file mode 100644
index 0000000..dd08e4a
--- /dev/null
+++ b/tests/fate/avs2.mak
@@ -0,0 +1,9 @@
+FATE_LIBDAVS2 = davs2
+
+FATE_LIBDAVS2  := $(FATE_LIBDAVS2:%=fate-avs2-%)
+
+FATE_SAMPLES_AVCONV += $(FATE_LIBDAVS2)
+FATE_SAMPLES_FFPROBE += $(FATE_LIBDAVS2_FFPROBE-yes)
+fate-libdavs2: $(FATE_LIBDAVS2) $(FATE_LIBDAVS2_FFPROBE-yes)
+
+fate-avs2-davs2:                 CMD = framecrc -vsync drop -vcodec libdavs2 -i $(TARGET_SAMPLES)/avs2/test.avs2 -flags +bitexact
diff --git a/tests/ref/fate/avs2-davs2 b/tests/ref/fate/avs2-davs2
new file mode 100644
index 0000000..45448bf
--- /dev/null
+++ b/tests/ref/fate/avs2-davs2
@@ -0,0 +1,98 @@
+#tb 0: 1/50
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 416x240
+#sar 0: 0/1
+0,          0,          0,        1,   149760, 0xe846980b
+0,          1,          1,        1,   149760, 0x8da0b6a5
+0,          2,          2,        1,   149760, 0x4e870abb
+0,          3,          3,        1,   149760, 0x9b6319c7
+0,          4,          4,        1,   149760, 0xf6406852
+0,          5,          5,        1,   149760, 0xf114c48b
+0,          6,          6,        1,   149760, 0xf687e7cc
+0,          7,          7,        1,   149760, 0x7fe42bbd
+0,          8,          8,        1,   149760, 0x6bf62c4e
+0,          9,          9,        1,   149760, 0xd73466dc
+0,         10,         10,        1,   149760, 0x90dca2b4
+0,         11,         11,        1,   149760, 0x8debab8e
+0,         12,         12,        1,   149760, 0x417ca7ad
+0,         13,         13,        1,   149760, 0xf553a64a
+0,         14,         14,        1,   149760, 0x7d22e5b3
+0,         15,         15,        1,   149760, 0x34700a54
+0,         16,         16,        1,   149760, 0xed001612
+0,         17,         17,        1,   149760, 0xfeab6089
+0,         18,         18,        1,   149760, 0x4cb26215
+0,         19,         19,        1,   149760, 0x4edf76c3
+0,         20,         20,        1,   149760, 0xabad8cb7
+0,         21,         21,        1,   149760, 0x7e909e0a
+0,         22,         22,        1,   149760, 0xf401c95e
+0,         23,         23,        1,   149760, 0x116ad718
+0,         24,         24,        1,   149760, 0xe1dae8a3
+0,         25,         25,        1,   149760, 0xf2d218f7
+0,         26,         26,        1,   149760, 0xb71f22e3
+0,         27,         27,        1,   149760, 0xd17d3435
+0,         28,         28,        1,   149760, 0x70de3926
+0,         29,         29,        1,   149760, 0x17b05086
+0,         30,         30,        1,   149760, 0x07526799
+0,         31,         31,        1,   149760, 0x74165cef
+0,         32,         32,        1,   149760, 0x162c7875
+0,         33,         33,        1,   149760, 0xf05c7f17
+0,         34,         34,        1,   149760, 0xaa16880b
+0,         35,         35,        1,   149760, 0xb5bb91ea
+0,         36,         36,        1,   149760, 0xfa42af20
+0,         37,         37,        1,   149760, 0xa044b73b
+0,         38,         38,        1,   149760, 0xc527cdf0
+0,         39,         39,        1,   149760, 0x1aa4c33d
+0,         40,         40,        1,   149760, 0x7a4502ad
+0,         41,         41,        1,   149760, 0xfea42c93
+0,         42,         42,        1,   149760, 0x8f675f4d
+0,         43,         43,        1,   149760, 0xd0a560d8
+0,         44,         44,        1,   149760, 0xa10a5b1e
+0,         45,         45,        1,   149760, 0x9b2f71be
+0,         46,         46,        1,   149760, 0x475b6478
+0,         47,         47,        1,   149760, 0xf0046092
+0,         48,         48,        1,   149760, 0x1e035e28
+0,         49,         49,        1,   149760, 0xc8706662
+0,         50,         50,        1,   149760, 0x666a9752
+0,         51,         51,        1,   149760, 0x55ada842
+0,         52,         52,        1,   149760, 0xff0fb577
+0,         53,         53,        1,   149760, 0x0139e4ed
+0,         54,         54,        1,   149760, 0x2f25f117
+0,         55,         55,        1,   149760, 0xcd0f18da
+0,         56,         56,        1,   149760, 0xef443f15
+0,         57,         57,        1,   149760, 0xb3718577
+0,         58,         58,        1,   149760, 0xd0518c27
+0,         59,         59,        1,   149760, 0x6e99c37d
+0,         60,         60,        1,   149760, 0xdc79f883
+0,         61,         61,        1,   149760, 0x98b1cb6d
+0,         62,         62,        1,   149760, 0x4c0f9599
+0,         63,         63,        1,   149760, 0xccce68ef
+0,         64,         64,        1,   149760, 0x716aa359
+0,         65,         65,        1,   149760, 0x15879b04
+0,         66,         66,        1,   149760, 0x41d033f5
+0,         67,         67,        1,   149760, 0xc7b02fe0
+0,         68,         68,        1,   149760, 0x928808b9
+0,         69,         69,        1,   149760, 0xa385400f
+0,         70,         70,        1,   149760, 0x767d43f0
+0,         71,         71,        1,   149760, 0x922b5bf6
+0,         72,         72,        1,   149760, 0x23116781
+0,         73,         73,        1,   149760, 0xbae7626c
+0,         74,         74,        1,   149760, 0x8b9c9e84
+0,         75,         75,        1,   149760, 0x88bbfc5a
+0,         76,         76,        1,   149760, 0xd559b1bc
+0,         77,         77,        1,   149760, 0x0fe75010
+0,         78,         78,        1,   149760, 0x5f21ea48
+0,         79,         79,        1,   149760, 0xc863f2d9
+0,         80,         80,        1,   149760, 0x7bb4e030
+0,         81,         81,        1,   149760, 0xf90cb4a2
+0,         82,         82,        1,   149760, 0xdb1fd615
+0,         83,         83,        1,   149760, 0xba78a989
+0,         84,         84,        1,   149760, 0x3ba25c29
+0,         85,         85,        1,   149760, 0xcfe25562
+0,         86,         86,        1,   149760, 0x4f9ea80b
+0,         87,         87,        1,   149760, 0x786c09b7
+0,         88,         88,        1,   149760, 0x34f995bc
+0,         89,         89,        1,   149760, 0xc6929859
+0,         90,         90,        1,   149760, 0xda81a4e7
+0,         91,         91,        1,   149760, 0x224cdee0
+0,         92,         92,        1,   149760, 0xa0a10cd2
