#!/usr/bin/env bash

pkg-config rasqal --atleast-version=0.9.29 || exit 3

# tests OPTIONALs with no left-hand-side

$TESTPATH/frontend/4s-query $CONF $1 '
SELECT * WHERE {
  ?v1 <http://xmlns.com/foaf/0.1/givenname> ?v2 .
  {
    OPTIONAL { ?vopt <http://xmlns.com/foaf/0.1/family_name> "Harris" . }
    FILTER( ?v1 = ?vopt )
  }
}'
echo "Returned $?"
