#!/usr/bin/env bash

# tests PREFIX, numbers in var names and single OPTIONAL triple with unbound
# results, multiple result rows for repeated predicates and FILTER inside
# OPTIONAL

$TESTPATH/frontend/4s-query $CONF $1 '
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?p ?sha1
WHERE { ?x foaf:knows ?p
        OPTIONAL { ?p foaf:mbox_sha1sum ?sha1 .
                   FILTER(REGEX(?sha1, "23")) } }
' | sort
