Debian Codegraph @

debian/tests/upstream-tests

raw
1 #!/bin/sh
2
3 set -eu
4
5 mkdir -p "$AUTOPKGTEST_TMP"
6 cp -r tests "$AUTOPKGTEST_TMP"/tests
7 # mock nvim-web-devicons
8 mkdir -p "$AUTOPKGTEST_TMP/lua"
9 cat > "$AUTOPKGTEST_TMP/lua/nvim-web-devicons.lua" <<'EOF'
10 local M = {}
11 local icons = {
12 txt = { icon = "󰈙", color = "#a89984" },
13 lua = { icon = "", color = "#a89984" },
14 }
15 function M.get_icon(name, ext, _)
16 local e = ext or (name and name:match("^.+%.(.+)$"))
17 local it = e and icons[e]
18 if not it then return nil end
19 return it.icon, it.color
20 end
21 function M.get_icon_color(name, ext, opts)
22 local icon, color = M.get_icon(name, ext, opts)
23 return icon, color
24 end
25 return M
26 EOF
27
28 cd "$AUTOPKGTEST_TMP"
29
30 nvim --headless -c "PlenaryBustedDirectory tests/ {sequential = true}" +qa