#!/bin/sh
set -C -e -f -u

cd "$AUTOPKGTEST_TMP"

# GPR.Knowledge depends on xmlada sources, so using its functions may
# detect a problem with indirect dependencies (like in 2017-1).

cat > a.adb <<EOF
with GPR.Knowledge;
procedure A is
   S : constant String := GPR.Knowledge.Default_Knowledge_Base_DIrectory;
begin
   null;
end A;
EOF

cat > p.gpr <<EOF
with "gnatprj.gpr";
project P is
   for Main use ("a.adb");
end P;
EOF

gprbuild -v p.gpr

./a
