aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-09-18 20:04:14 +0000
committerLev Walkin <vlm@lionet.info>2006-09-18 20:04:14 +0000
commitc33a59efca1ee1fcb92aef30b49d22b832494401 (patch)
tree5b070f0258f0fa99b734a73247e7ab9b20057a34 /examples
parent21f927721dbba609062462eba0ecfa4cb15c03a8 (diff)
more testing
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/sample.makefile.regen33
-rw-r--r--examples/sample.source.LDAP3/Makefile61
-rw-r--r--examples/sample.source.MHEG5/Makefile37
-rw-r--r--examples/sample.source.PKIX1/Makefile61
-rw-r--r--examples/sample.source.RRC/Makefile31
-rw-r--r--examples/sample.source.RRC/sample-DL-DCCH-Message-1-padded.perbin0 -> 14 bytes
-rw-r--r--examples/sample.source.RRC/sample-DL-DCCH-Message-1.perbin0 -> 12 bytes
-rw-r--r--examples/sample.source.TAP3/Makefile61
8 files changed, 225 insertions, 59 deletions
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index 1b8f8c4a..b3b0e0d8 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -44,7 +44,7 @@ cat Makefile.am.sample \
> Makefile.$$
( echo
- echo "${ASN1PDU}.c: $0"
+ echo "${ASN1PDU}.c: $0 ${ASN1MODULES}"
echo " make regen-makefile"
echo " @touch ${ASN1PDU}.c"
echo " make"
@@ -82,17 +82,36 @@ cat Makefile.am.sample \
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 " for f in ./sample-${ASN1PDU}-[1-9].per; do \\"
echo ' echo "Recoding $$f into DER into XER and back..."; \'
- echo ' ./${TARGET} -iper -oder -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \'
- echo ' ./${TARGET} -iper -oder -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \'
- echo ' ./${TARGET} -iper -oder -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \'
- echo ' ./${TARGET} -iper -oder -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \'
echo ' ./${TARGET} -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
echo ' ./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \'
+ echo ' rm -f ./.tmp.[1234].$$$$; \'
+ echo ' done; fi'
+ echo " @if test -f ./sample-${ASN1PDU}-1-padded.per ; then \\"
+ echo " for f in ./sample-${ASN1PDU}-[1-9]-padded.per; do \\"
+ echo ' echo "Recoding byte-padded $$f into DER into XER and back..."; \'
+ echo ' ./${TARGET} -per-padded -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -per-padded -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -per-padded -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -per-padded -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \'
+ echo ' diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -per-padded -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -iber -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 ' rm -f ./.tmp.[1234].$$$$; \'
echo ' done; fi'
echo ' @echo ================'
echo ' @echo All tests passed'
diff --git a/examples/sample.source.LDAP3/Makefile b/examples/sample.source.LDAP3/Makefile
index 1c4ff234..6de7245e 100644
--- a/examples/sample.source.LDAP3/Makefile
+++ b/examples/sample.source.LDAP3/Makefile
@@ -187,7 +187,7 @@ regenerate-from-asn1-source:
../../asn1c/asn1c -S ../../skeletons -fcompound-names ../rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1
-LDAPMessage.c: ../sample.makefile.regen
+LDAPMessage.c: ../sample.makefile.regen ../rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1
make regen-makefile
@touch LDAPMessage.c
make
@@ -203,27 +203,58 @@ 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].$$; \
+ ./${TARGET} -iber -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${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
@if test -f ./sample-LDAPMessage-1.xer ; then \
for f in ./sample-LDAPMessage-*.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].$$; \
+ ./${TARGET} -ixer -oder -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${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-LDAPMessage-1.per ; then \
- for f in ./sample-LDAPMessage-*.per; do \
+ for f in ./sample-LDAPMessage-[1-9].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].$$; \
+ ./${TARGET} -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ rm -f ./.tmp.[1234].$$$$; \
+ done; fi
+ @if test -f ./sample-LDAPMessage-1-padded.per ; then \
+ for f in ./sample-LDAPMessage-[1-9]-padded.per; do \
+ echo "Recoding byte-padded $$f into DER into XER and back..."; \
+ ./${TARGET} -per-padded -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -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.[1234].$$$$; \
done; fi
@echo ================
@echo All tests passed
diff --git a/examples/sample.source.MHEG5/Makefile b/examples/sample.source.MHEG5/Makefile
index db9e1950..53490efd 100644
--- a/examples/sample.source.MHEG5/Makefile
+++ b/examples/sample.source.MHEG5/Makefile
@@ -477,7 +477,7 @@ regenerate-from-asn1-source:
../../asn1c/asn1c -S ../../skeletons -fcompound-names ../ISO13522-MHEG-5.asn
-InterchangedObject.c: ../sample.makefile.regen
+InterchangedObject.c: ../sample.makefile.regen ../ISO13522-MHEG-5.asn
make regen-makefile
@touch InterchangedObject.c
make
@@ -493,6 +493,10 @@ check: ${TARGET}
@if test -f ./sample-InterchangedObject-1.[db]er ; then \
for f in ./sample-InterchangedObject-*.[db]er; do \
echo "Recoding $$f into XER and back..."; \
+ ./${TARGET} -iber -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
./${TARGET} -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
./${TARGET} -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
@@ -501,19 +505,46 @@ check: ${TARGET}
@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 -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
./${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 \
+ for f in ./sample-InterchangedObject-[1-9].per; do \
echo "Recoding $$f into DER into XER and back..."; \
+ ./${TARGET} -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
./${TARGET} -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ rm -f ./.tmp.[1234].$$$$; \
+ done; fi
+ @if test -f ./sample-InterchangedObject-1-padded.per ; then \
+ for f in ./sample-InterchangedObject-[1-9]-padded.per; do \
+ echo "Recoding byte-padded $$f into DER into XER and back..."; \
+ ./${TARGET} -per-padded -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -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].$$$$; \
+ rm -f ./.tmp.[1234].$$$$; \
done; fi
@echo ================
@echo All tests passed
diff --git a/examples/sample.source.PKIX1/Makefile b/examples/sample.source.PKIX1/Makefile
index de54195c..b0fde7f7 100644
--- a/examples/sample.source.PKIX1/Makefile
+++ b/examples/sample.source.PKIX1/Makefile
@@ -369,7 +369,7 @@ regenerate-from-asn1-source:
../../asn1c/asn1c -S ../../skeletons ../rfc3280-PKIX1Explicit88.asn1 ../rfc3280-PKIX1Implicit88.asn1
-Certificate.c: ../sample.makefile.regen
+Certificate.c: ../sample.makefile.regen ../rfc3280-*.asn1
make regen-makefile
@touch Certificate.c
make
@@ -385,27 +385,58 @@ 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].$$; \
+ ./${TARGET} -iber -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${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
@if test -f ./sample-Certificate-1.xer ; then \
for f in ./sample-Certificate-*.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].$$; \
+ ./${TARGET} -ixer -oder -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${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-Certificate-1.per ; then \
- for f in ./sample-Certificate-*.per; do \
+ for f in ./sample-Certificate-[1-9].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].$$; \
+ ./${TARGET} -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ rm -f ./.tmp.[1234].$$$$; \
+ done; fi
+ @if test -f ./sample-Certificate-1-padded.per ; then \
+ for f in ./sample-Certificate-[1-9]-padded.per; do \
+ echo "Recoding byte-padded $$f into DER into XER and back..."; \
+ ./${TARGET} -per-padded -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -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.[1234].$$$$; \
done; fi
@echo ================
@echo All tests passed
diff --git a/examples/sample.source.RRC/Makefile b/examples/sample.source.RRC/Makefile
index f694fc43..6e623894 100644
--- a/examples/sample.source.RRC/Makefile
+++ b/examples/sample.source.RRC/Makefile
@@ -4764,7 +4764,7 @@ regenerate-from-asn1-source:
../../asn1c/asn1c -S ../../skeletons -fcompound-names -pdu=auto -gen-PER ../rrc.asn1
-DL-DCCH-Message.c: ../sample.makefile.regen
+DL-DCCH-Message.c: ../sample.makefile.regen ../rrc.asn1
make regen-makefile
@touch DL-DCCH-Message.c
make
@@ -4802,13 +4802,36 @@ check: ${TARGET}
rm -f ./.tmp.[12].$$$$; \
done; fi
@if test -f ./sample-DL-DCCH-Message-1.per ; then \
- for f in ./sample-DL-DCCH-Message-*.per; do \
+ for f in ./sample-DL-DCCH-Message-[1-9].per; do \
echo "Recoding $$f into DER into XER and back..."; \
+ ./${TARGET} -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
./${TARGET} -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ rm -f ./.tmp.[1234].$$$$; \
+ done; fi
+ @if test -f ./sample-DL-DCCH-Message-1-padded.per ; then \
+ for f in ./sample-DL-DCCH-Message-[1-9]-padded.per; do \
+ echo "Recoding byte-padded $$f into DER into XER and back..."; \
+ ./${TARGET} -per-padded -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 1; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 3; \
+ ./${TARGET} -per-padded -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -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].$$$$; \
+ diff $$f ./.tmp.1.$$$$ || exit 4; \
+ rm -f ./.tmp.[1234].$$$$; \
done; fi
@echo ================
@echo All tests passed
diff --git a/examples/sample.source.RRC/sample-DL-DCCH-Message-1-padded.per b/examples/sample.source.RRC/sample-DL-DCCH-Message-1-padded.per
new file mode 100644
index 00000000..2ae327a3
--- /dev/null
+++ b/examples/sample.source.RRC/sample-DL-DCCH-Message-1-padded.per
Binary files differ
diff --git a/examples/sample.source.RRC/sample-DL-DCCH-Message-1.per b/examples/sample.source.RRC/sample-DL-DCCH-Message-1.per
new file mode 100644
index 00000000..584e85be
--- /dev/null
+++ b/examples/sample.source.RRC/sample-DL-DCCH-Message-1.per
Binary files differ
diff --git a/examples/sample.source.TAP3/Makefile b/examples/sample.source.TAP3/Makefile
index 4dd100ca..e3826163 100644
--- a/examples/sample.source.TAP3/Makefile
+++ b/examples/sample.source.TAP3/Makefile
@@ -703,7 +703,7 @@ regenerate-from-asn1-source:
../../asn1c/asn1c -S ../../skeletons ../tap3.asn1
-DataInterChange.c: ../sample.makefile.regen
+DataInterChange.c: ../sample.makefile.regen ../tap3.asn1
make regen-makefile
@touch DataInterChange.c
make
@@ -719,27 +719,58 @@ check: ${TARGET}
@if test -f ./sample-DataInterChange-1.[db]er ; then \
for f in ./sample-DataInterChange-*.[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].$$; \
+ ./${TARGET} -iber -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${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
@if test -f ./sample-DataInterChange-1.xer ; then \
for f in ./sample-DataInterChange-*.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].$$; \
+ ./${TARGET} -ixer -oder -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${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-DataInterChange-1.per ; then \
- for f in ./sample-DataInterChange-*.per; do \
+ for f in ./sample-DataInterChange-[1-9].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].$$; \
+ ./${TARGET} -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ rm -f ./.tmp.[1234].$$$$; \
+ done; fi
+ @if test -f ./sample-DataInterChange-1-padded.per ; then \
+ for f in ./sample-DataInterChange-[1-9]-padded.per; do \
+ echo "Recoding byte-padded $$f into DER into XER and back..."; \
+ ./${TARGET} -per-padded -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oxer -b 980 $$f > ./.tmp.4.$$$$ || exit 2; \
+ diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
+ diff ./.tmp.2.$$$$ ./.tmp.3.$$$$ || exit 2; \
+ diff ./.tmp.3.$$$$ ./.tmp.4.$$$$ || exit 2; \
+ ./${TARGET} -per-padded -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
+ ./${TARGET} -iber -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.[1234].$$$$; \
done; fi
@echo ================
@echo All tests passed