XER reference types encoding error


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1201 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index ba03514..95c1779 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -65,6 +65,23 @@
 	echo '	diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \'
 	echo '	rm -f ./.tmp.[12].$$; \'
 	echo '	done; fi'
+	echo "	@if test -f ./sample-${ASN1PDU}-1.xer ; then \\"
+	echo "	for f in ./sample-${ASN1PDU}-*.xer; do \\"
+	echo '	echo "Recoding $$f into DER and back..."; \'
+	echo '	./${TARGET} -ixer -oder $$f > ./.tmp.1.$$ || exit 2; \'
+	echo '	./${TARGET} -iber -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \'
+	echo '	diff $$f ./.tmp.2.$$ || exit 2; \'
+	echo '	rm -f ./.tmp.[12].$$; \'
+	echo '	done; fi'
+	echo "	@if test -f ./sample-${ASN1PDU}-1.per ; then \\"
+	echo "	for f in ./sample-${ASN1PDU}-*.per; do \\"
+	echo '	echo "Recoding $$f into DER into XER and back..."; \'
+	echo '	./${TARGET} -iper -oder $$f > ./.tmp.1.$$ || exit 2; \'
+	echo '	./${TARGET} -ider -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \'
+	echo '	./${TARGET} -ixer -oper ./.tmp.2.$$ > ./.tmp.1.$$ || exit 2; \'
+	echo '	diff $$f ./.tmp.1.$$ || exit 2; \'
+	echo '	rm -f ./.tmp.[12].$$; \'
+	echo '	done; fi'
 	echo '	@echo ================'
 	echo '	@echo All tests passed'
 	echo '	@echo ================'
diff --git a/examples/sample.source.MHEG5/Makefile b/examples/sample.source.MHEG5/Makefile
index 8eea244..4a4f48f 100644
--- a/examples/sample.source.MHEG5/Makefile
+++ b/examples/sample.source.MHEG5/Makefile
@@ -498,6 +498,23 @@
 	diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \
 	rm -f ./.tmp.[12].$$; \
 	done; fi
+	@if test -f ./sample-InterchangedObject-1.xer ; then \
+	for f in ./sample-InterchangedObject-*.xer; do \
+	echo "Recoding $$f into DER and back..."; \
+	./${TARGET} -ixer -oder $$f > ./.tmp.1.$$ || exit 2; \
+	./${TARGET} -iber -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \
+	diff $$f ./.tmp.2.$$ || exit 2; \
+	rm -f ./.tmp.[12].$$; \
+	done; fi
+	@if test -f ./sample-InterchangedObject-1.per ; then \
+	for f in ./sample-InterchangedObject-*.per; do \
+	echo "Recoding $$f into DER into XER and back..."; \
+	./${TARGET} -iper -oder $$f > ./.tmp.1.$$ || exit 2; \
+	./${TARGET} -ider -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \
+	./${TARGET} -ixer -oper ./.tmp.2.$$ > ./.tmp.1.$$ || exit 2; \
+	diff $$f ./.tmp.1.$$ || exit 2; \
+	rm -f ./.tmp.[12].$$; \
+	done; fi
 	@echo ================
 	@echo All tests passed
 	@echo ================