<commit_before>#! /bin/bash
#
# verify round-trip for valid _and_ invalid basic temporal types

curl_sparql_request \
     -H "Accept: application/n-quads" \
     -H "Content-Type:application/sparql-query" <<EOF \
  | tee $ECHO_OUTPUT | diff -w - /dev/fd/2 2<<TEST
construct {
  [ <http://example.org#value> ?o ]
}
where {
  values ?o {
    '2020-12-03'^^xsd:date
    '2020-12-03-06:00'^^xsd:date
    '2020-12-03+06:00'^^xsd:date
    '2020-12-03Z'^^xsd:date
    '2020-12-03Z+06:00'^^xsd:date
    '2020-12-03T00:00:00'^^xsd:dateTime
    '2020-12-03T00:00:00Z'^^xsd:dateTime
    '2020-12-03T00:00:00-06:00'^^xsd:dateTime
    '2020-12-03T00:00:00+06:00'^^xsd:dateTime
    '2020-12-03T00:00:00Z-06:00'^^xsd:dateTime
    '2020-12-03T00:00:00Z+06:00'^^xsd:dateTime
    '00:03:00'^^xsd:time
    '00:03:00-06:00'^^xsd:time
    '00:03:00+06:00'^^xsd:time
    '00:03:00Z'^^xsd:time
    '00:03:00Z+06:00'^^xsd:time
  }
}
EOF

TEST<commit_msg>[SKIP CI] new #284 results<commit_after>#! /bin/bash
#
# verify round-trip for valid _and_ invalid basic temporal types

curl_sparql_request \
     -H "Accept: application/n-quads" \
     -H "Content-Type:application/sparql-query" <<EOF \
  | tee $ECHO_OUTPUT | diff -w - /dev/fd/2 2<<TEST
construct {
  [ <http://example.org#value> ?o ]
}
where {
  values ?o {
    '2020-12-03'^^xsd:date
    '2020-12-03-06:00'^^xsd:date
    '2020-12-03+06:00'^^xsd:date
    '2020-12-03Z'^^xsd:date
    '2020-12-03Z+06:00'^^xsd:date
    '2020-12-03T00:00:00'^^xsd:dateTime
    '2020-12-03T00:00:00Z'^^xsd:dateTime
    '2020-12-03T00:00:00-06:00'^^xsd:dateTime
    '2020-12-03T00:00:00+06:00'^^xsd:dateTime
    '2020-12-03T00:00:00Z-06:00'^^xsd:dateTime
    '2020-12-03T00:00:00Z+06:00'^^xsd:dateTime
    '00:03:00'^^xsd:time
    '00:03:00-06:00'^^xsd:time
    '00:03:00+06:00'^^xsd:time
    '00:03:00Z'^^xsd:time
    '00:03:00Z+06:00'^^xsd:time
  }
}
EOF
_:g1 <http://example.org#value> "2020-12-03"^^<http://www.w3.org/2001/XMLSchema#date> .
_:g2 <http://example.org#value> "2020-12-03-06:00"^^<http://www.w3.org/2001/XMLSchema#date> .
_:g3 <http://example.org#value> "2020-12-03+06:00"^^<http://www.w3.org/2001/XMLSchema#date> .
_:g4 <http://example.org#value> "2020-12-03"^^<http://www.w3.org/2001/XMLSchema#date> .
_:g5 <http://example.org#value> "2020-12-03Z+06:00"^^<http://www.w3.org/2001/XMLSchema#date> .
_:g6 <http://example.org#value> "2020-12-03T00:00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:g7 <http://example.org#value> "2020-12-03T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:g8 <http://example.org#value> "2020-12-03T06:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:g9 <http://example.org#value> "2020-12-02T18:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:g10 <http://example.org#value> "2020-12-03T00:00:00Z-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:g11 <http://example.org#value> "2020-12-03T00:00:00Z+06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:g12 <http://example.org#value> "00:03:00Z"^^<http://www.w3.org/2001/XMLSchema#time> .
_:g13 <http://example.org#value> "06:03:00Z"^^<http://www.w3.org/2001/XMLSchema#time> .
_:g14 <http://example.org#value> "18:03:00Z"^^<http://www.w3.org/2001/XMLSchema#time> .
_:g15 <http://example.org#value> "00:03:00Z"^^<http://www.w3.org/2001/XMLSchema#time> .
_:g16 <http://example.org#value> "00:03:00Z+06:00"^^<http://www.w3.org/2001/XMLSchema#time> .
TEST
{'fraction_non_alphanumeric': 0.24236192714453583, 'fraction_numerical': 0.19858989424206816, 'mean_word_length': 4.3203125, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 16, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4032185', 'n_tokens_mistral': 2013, 'n_tokens_neox': 1577, 'n_words': 147}