XER can decode long values


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1185 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index 134e1f2..0e28ab6 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -35,6 +35,19 @@
 	echo "	@touch ${ASN1PDU}.c"
 	echo "	make"
 	echo
+	echo 'check: ${TARGET}'
+	echo "	@if test -f ./sample-${ASN1PDU}-1.[db]er ; then \\"
+	echo "	for f in ./sample-${ASN1PDU}-*.[db]er; do \\"
+	echo '	echo "Recoding $$f into XER and back..."; \'
+	echo '	./${TARGET} -iber -oxer $$f > ./.tmp.1.$$ || exit 2; \'
+	echo '	./${TARGET} -ixer -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \'
+	echo '	diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \'
+	echo '	rm -f ./.tmp.[12].$$; \'
+	echo '	done; fi'
+	echo '	@echo ================'
+	echo '	@echo All tests passed'
+	echo '	@echo ================'
+	echo
 	echo "distclean: clean"
 	echo '	rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)'
 	echo '	rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS)'
diff --git a/examples/sample.source.LDAP3/Makefile b/examples/sample.source.LDAP3/Makefile
index f7dfc64..5483981 100644
--- a/examples/sample.source.LDAP3/Makefile
+++ b/examples/sample.source.LDAP3/Makefile
@@ -196,6 +196,19 @@
 	@touch LDAPMessage.c
 	make
 
+check: ${TARGET}
+	@if test -f ./sample-LDAPMessage-1.[db]er ; then \
+	for f in ./sample-LDAPMessage-*.[db]er; do \
+	echo "Recoding $$f into XER and back..."; \
+	./${TARGET} -iber -oxer $$f > ./.tmp.1.$$ || exit 2; \
+	./${TARGET} -ixer -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \
+	diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \
+	rm -f ./.tmp.[12].$$; \
+	done; fi
+	@echo ================
+	@echo All tests passed
+	@echo ================
+
 distclean: clean
 	rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
 	rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS)
diff --git a/examples/sample.source.MEGACO/Makefile b/examples/sample.source.MEGACO/Makefile
index d922a9d..b1415a2 100644
--- a/examples/sample.source.MEGACO/Makefile
+++ b/examples/sample.source.MEGACO/Makefile
@@ -318,6 +318,19 @@
 	@touch MegacoMessage.c
 	make
 
+check: ${TARGET}
+	@if test -f ./sample-MegacoMessage-1.[db]er ; then \
+	for f in ./sample-MegacoMessage-*.[db]er; do \
+	echo "Recoding $$f into XER and back..."; \
+	./${TARGET} -iber -oxer $$f > ./.tmp.1.$$ || exit 2; \
+	./${TARGET} -ixer -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \
+	diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \
+	rm -f ./.tmp.[12].$$; \
+	done; fi
+	@echo ================
+	@echo All tests passed
+	@echo ================
+
 distclean: clean
 	rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
 	rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS)
diff --git a/examples/sample.source.PKIX1/Makefile b/examples/sample.source.PKIX1/Makefile
index 30e8951..26ca748 100644
--- a/examples/sample.source.PKIX1/Makefile
+++ b/examples/sample.source.PKIX1/Makefile
@@ -378,6 +378,19 @@
 	@touch Certificate.c
 	make
 
+check: ${TARGET}
+	@if test -f ./sample-Certificate-1.[db]er ; then \
+	for f in ./sample-Certificate-*.[db]er; do \
+	echo "Recoding $$f into XER and back..."; \
+	./${TARGET} -iber -oxer $$f > ./.tmp.1.$$ || exit 2; \
+	./${TARGET} -ixer -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \
+	diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \
+	rm -f ./.tmp.[12].$$; \
+	done; fi
+	@echo ================
+	@echo All tests passed
+	@echo ================
+
 distclean: clean
 	rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
 	rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS)