patch 8.0.0499: taglist() does not prioritize tags for a buffer

Problem:    taglist() does not prioritize tags for a buffer.
Solution:   Add an optional buffer argument. (Duncan McDougall, closes #1194)
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 314a5b7..7b31575 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -47,6 +47,7 @@
 source test_tabpage.vim
 source test_tagcase.vim
 source test_tagjump.vim
+source test_taglist.vim
 source test_timers.vim
 source test_true_false.vim
 source test_unlet.vim
diff --git a/src/testdir/test_taglist.vim b/src/testdir/test_taglist.vim
new file mode 100644
index 0000000..b89b25e
--- /dev/null
+++ b/src/testdir/test_taglist.vim
@@ -0,0 +1,21 @@
+" test 'taglist' function
+
+func Test_taglist()
+  call writefile([
+	\ "FFoo\tXfoo\t1",
+	\ "FBar\tXfoo\t2",
+	\ "BFoo\tXbar\t1",
+	\ "BBar\tXbar\t2"
+	\ ], 'Xtags')
+  set tags=Xtags
+  split Xtext
+
+  call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name}))
+  call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xtext"), {i, v -> v.name}))
+  call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name}))
+  call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name}))
+
+  call delete('Xtags')
+  bwipe
+endfunc
+