#!/bin/sh

set -e
exec 1>&2

# https://gitlab.com/preserves/preserves/-/issues/30
#
# So it turns out that Racket's git-checkout mechanism pays attention
# to portions of the tree outside the package of interest, which is
# totally fair enough!
#
# But it means we can't use updir-containing symlinks anywhere in the
# repository if we want to have a Racket-installable package as well,
# *even if* the non-Racket implementation concerned is OK with
# updir-containing symlinks.

# Ensure that various copies of schema.prs, schema.bin, path.bin,
# samples.pr and samples.bin are in fact identical.
cmp path/path.bin implementations/python/preserves/path.prb
cmp path/path.bin implementations/rust/preserves-path/path.bin
cmp schema/schema.bin implementations/python/preserves/schema.prb
cmp schema/schema.prs implementations/racket/preserves/preserves-schema/schema.prs
cmp tests/samples.bin implementations/python/tests/samples.bin
cmp tests/samples.pr implementations/python/tests/samples.pr
cmp tests/samples.pr implementations/racket/preserves/preserves/tests/samples.pr
