Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
13afe53c
Commit
13afe53c
authored
Sep 18, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debug
parent
00918813
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
211 additions
and
309 deletions
+211
-309
examples/sample.makefile.regen
examples/sample.makefile.regen
+24
-42
examples/sample.source.LDAP3/Makefile
examples/sample.source.LDAP3/Makefile
+24
-42
examples/sample.source.MEGACO/Makefile
examples/sample.source.MEGACO/Makefile
+40
-26
examples/sample.source.MHEG5/Makefile
examples/sample.source.MHEG5/Makefile
+33
-50
examples/sample.source.PKIX1/Makefile
examples/sample.source.PKIX1/Makefile
+33
-50
examples/sample.source.RRC/Makefile
examples/sample.source.RRC/Makefile
+24
-49
examples/sample.source.TAP3/Makefile
examples/sample.source.TAP3/Makefile
+33
-50
No files found.
examples/sample.makefile.regen
View file @
13afe53c
...
...
@@ -59,61 +59,43 @@ cat Makefile.am.sample \
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 -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -iber -oxer -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -iber -oxer -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -iber -oxer -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo
' for b in 1 17 33 980 8192; do \'
echo
' echo "Recoding $$f into XER and back ($$b)..."; \'
echo
' ./${TARGET} -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -b $$b -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
' done;
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 -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -ixer -oder -b 17 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -ixer -oder -b 33 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -ixer -oder -b 980 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo
' for b in 1 17 33 980 8192; do \'
echo
' echo "Recoding $$f into DER and back ($$b)..."; \'
echo
' ./${TARGET} -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo
' diff $$f ./.tmp.2.$$$$ || exit 2; \'
echo
' rm -f ./.tmp.[12].$$$$; \'
echo
' done; fi'
echo
' done;
done;
fi'
echo
" @if test -f sample-
${
ASN1PDU
}
-1.per ; then
\\
"
echo
" for f in sample-
${
ASN1PDU
}
-[1-9].per; do
\\
"
echo
' echo "Recoding $$f into DER into XER and back..."; \'
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
' for b in 1 17 33 980 8192; do \'
echo
' echo "Recoding $$f into DER into XER and back ($$b)..."; \'
echo
' ./${TARGET} -b $$b -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo
' ./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \'
echo
' diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \'
echo
' rm -f ./.tmp.[123
4
].$$$$; \'
echo
' done; fi'
echo
' rm -f ./.tmp.[123].$$$$; \'
echo
' done;
done;
fi'
echo
" @if test -f sample-
${
ASN1PDU
}
-1-padded.per ; then
\\
"
echo
" for f in sample-*-[1-9]-padded.per; do
\\
"
echo
' pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z-]+)-[0-9].*/\1/"`; \'
echo
' echo "Recoding byte-padded $$f into DER into XER and back..."; \'
echo
' ./${TARGET} -per-padded -p $$pdu -iper -oxer -b 1 $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -per-padded -p $$pdu -iper -oxer -b 17 $$f > ./.tmp.2.$$$$ || exit 2; \'
echo
' ./${TARGET} -per-padded -p $$pdu -iper -oxer -b 33 $$f > ./.tmp.3.$$$$ || exit 2; \'
echo
' ./${TARGET} -per-padded -p $$pdu -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 -p $$pdu -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -p $$pdu -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo
' ./${TARGET} -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \'
echo
' for b in 1 17 33 980 8192; do \'
echo
' echo "Recoding byte-padded $$f into DER into XER and back ($$b)..."; \'
echo
' ./${TARGET} -b $$b -per-padded -p $$pdu -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \'
echo
' ./${TARGET} -b $$b -p $$pdu -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo
' ./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \'
echo
' diff $$f ./.tmp.1.$$$$ || exit 2; \'
echo
' rm -f ./.tmp.[12
34
].$$$$; \'
echo
' done; fi'
echo
' rm -f ./.tmp.[12].$$$$; \'
echo
' done;
done;
fi'
echo
' @echo ================'
echo
' @echo All tests passed'
echo
' @echo ================'
...
...
examples/sample.source.LDAP3/Makefile
View file @
13afe53c
...
...
@@ -202,61 +202,43 @@ regen-makefile:
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
-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
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-ixer
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
diff ./.tmp.1.
$$$$
./.tmp.2.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
fi
done
;
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
-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
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.2.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
fi
done
;
done
;
fi
@
if
test
-f
sample-LDAPMessage-1.per
;
then
\
for
f
in
sample-LDAPMessage-[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
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
./.tmp.2.
$$$$
>
./.tmp.3.
$$$$
||
exit
2
;
\
diff ./.tmp.1.
$$$$
./.tmp.3.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[123
4
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[123].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-LDAPMessage-1-padded.per
;
then
\
for
f
in
sample-
*
-[1-9]-padded.per
;
do
\
pdu
=
`
echo
$$
f |
sed
-E
-e
"s/sample-([A-Za-z-]+)-[0-9].*/
\1
/"
`
;
\
echo
"Recoding byte-padded
$$
f into DER into XER and back..."
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oxer
-b
1
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oxer
-b
17
$$
f
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oxer
-b
33
$$
f
>
./.tmp.3.
$$$$
||
exit
2
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-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
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding byte-padded
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12
34
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
echo
================
@
echo
All tests passed
@
echo
================
...
...
examples/sample.source.MEGACO/Makefile
View file @
13afe53c
...
...
@@ -309,7 +309,7 @@ regenerate-from-asn1-source:
../../asn1c/asn1c
-S
../../skeletons
-fcompound-names
../rfc3525-MEDIA-GATEWAY-CONTROL.asn1
MegacoMessage.c
:
../sample.makefile.regen
MegacoMessage.c
:
../sample.makefile.regen
../rfc3525-MEDIA-GATEWAY-CONTROL.asn1
make regen-makefile
@
touch
MegacoMessage.c
make
...
...
@@ -322,31 +322,45 @@ regen-makefile:
../sample.makefile.regen
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
@
if
test
-f
./sample-MegacoMessage-1.xer
;
then
\
for
f
in
./sample-MegacoMessage-
*
.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-MegacoMessage-1.per
;
then
\
for
f
in
./sample-MegacoMessage-
*
.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
@
if
test
-f
sample-MegacoMessage-1.[db]er
;
then
\
for
f
in
sample-MegacoMessage-
*
.[db]er
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-ixer
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
diff ./.tmp.1.
$$$$
./.tmp.2.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-MegacoMessage-1.xer
;
then
\
for
f
in
sample-MegacoMessage-
*
.xer
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.2.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-MegacoMessage-1.per
;
then
\
for
f
in
sample-MegacoMessage-[1-9].per
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
./.tmp.2.
$$$$
>
./.tmp.3.
$$$$
||
exit
2
;
\
diff ./.tmp.1.
$$$$
./.tmp.3.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[123].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-MegacoMessage-1-padded.per
;
then
\
for
f
in
sample-
*
-[1-9]-padded.per
;
do
\
pdu
=
`
echo
$$
f |
sed
-E
-e
"s/sample-([A-Za-z-]+)-[0-9].*/
\1
/"
`
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding byte-padded
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
echo
================
@
echo
All tests passed
@
echo
================
...
...
examples/sample.source.MHEG5/Makefile
View file @
13afe53c
...
...
@@ -490,62 +490,45 @@ regen-makefile:
../sample.makefile.regen
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
;
\
@
if
test
-f
sample-InterchangedObject-1.[db]er
;
then
\
for
f
in
sample-InterchangedObject-
*
.[db]er
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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-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
;
\
done
;
done
;
fi
@
if
test
-f
sample-InterchangedObject-1.xer
;
then
\
for
f
in
sample-InterchangedObject-
*
.xer
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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-[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
;
\
done
;
done
;
fi
@
if
test
-f
sample-InterchangedObject-1.per
;
then
\
for
f
in
sample-InterchangedObject-[1-9].per
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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
;
\
rm
-f
./.tmp.[123].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-InterchangedObject-1-padded.per
;
then
\
for
f
in
sample-
*
-[1-9]-padded.per
;
do
\
pdu
=
`
echo
$$
f |
sed
-E
-e
"s/sample-([A-Za-z-]+)-[0-9].*/
\1
/"
`
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding byte-padded
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12
34
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
echo
================
@
echo
All tests passed
@
echo
================
...
...
examples/sample.source.PKIX1/Makefile
View file @
13afe53c
...
...
@@ -382,62 +382,45 @@ regen-makefile:
../sample.makefile.regen
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
-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
;
\
@
if
test
-f
sample-Certificate-1.[db]er
;
then
\
for
f
in
sample-Certificate-
*
.[db]er
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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
-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
;
\
done
;
done
;
fi
@
if
test
-f
sample-Certificate-1.xer
;
then
\
for
f
in
sample-Certificate-
*
.xer
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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-[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
;
\
done
;
done
;
fi
@
if
test
-f
sample-Certificate-1.per
;
then
\
for
f
in
sample-Certificate-[1-9].per
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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
;
\
rm
-f
./.tmp.[123].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-Certificate-1-padded.per
;
then
\
for
f
in
sample-
*
-[1-9]-padded.per
;
do
\
pdu
=
`
echo
$$
f |
sed
-E
-e
"s/sample-([A-Za-z-]+)-[0-9].*/
\1
/"
`
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding byte-padded
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12
34
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
echo
================
@
echo
All tests passed
@
echo
================
...
...
examples/sample.source.RRC/Makefile
View file @
13afe53c
...
...
@@ -4779,68 +4779,43 @@ regen-makefile:
check
:
${TARGET}
@
if
test
-f
sample-DL-DCCH-Message-1.[db]er
;
then
\
for
f
in
sample-DL-DCCH-Message-
*
.[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
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-ixer
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
diff ./.tmp.1.
$$$$
./.tmp.2.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
fi
done
;
done
;
fi
@
if
test
-f
sample-DL-DCCH-Message-1.xer
;
then
\
for
f
in
sample-DL-DCCH-Message-
*
.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
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.2.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
fi
done
;
done
;
fi
@
if
test
-f
sample-DL-DCCH-Message-1.per
;
then
\
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
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
./.tmp.2.
$$$$
>
./.tmp.3.
$$$$
||
exit
2
;
\
diff ./.tmp.1.
$$$$
./.tmp.3.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[123
4
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[123].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-DL-DCCH-Message-1-padded.per
;
then
\
for
f
in
sample-
*
-[1-9]-padded.per
;
do
\
pdu
=
`
echo
$$
f |
sed
-E
-e
"s/sample-([A-Za-z-]+)-[0-9].*/
\1
/"
`
;
\
echo
"Recoding byte-padded
$$
f into DER into XER and back..."
;
\
echo
"./
${TARGET}
-per-padded -p
$$
pdu -iper -oxer -b 1
$$
f > ./.tmp.1.
$$$$
"
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oxer
-b
1
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
echo
"./
${TARGET}
-per-padded -p
$$
pdu -iper -oxer -b 17
$$
f > ./.tmp.2.
$$$$
"
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oxer
-b
17
$$
f
>
./.tmp.2.
$$$$
||
exit
2
;
\
echo
"./
${TARGET}
-per-padded -p
$$
pdu -iper -oxer -b 33
$$
f > ./.tmp.3.
$$$$
"
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oxer
-b
33
$$
f
>
./.tmp.3.
$$$$
||
exit
2
;
\
echo
"./
${TARGET}
-per-padded -p
$$
pdu -iper -oxer -b 980
$$
f > ./.tmp.4.
$$$$
"
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-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
;
\
echo
"./
${TARGET}
-per-padded -p
$$
pdu -iper -oder
$$
f > ./.tmp.1.
$$$$
"
;
\
./
${TARGET}
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
echo
"./
${TARGET}
-p
$$
pdu -iber -oxer ./.tmp.1.
$$$$
> ./.tmp.2.
$$$$
"
;
\
./
${TARGET}
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
echo
"./
${TARGET}
-p
$$
pdu -ixer -oper ./.tmp.2.
$$$$
> ./.tmp.1.
$$$$
"
;
\
./
${TARGET}
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding byte-padded
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12
34
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
echo
================
@
echo
All tests passed
@
echo
================
...
...
examples/sample.source.TAP3/Makefile
View file @
13afe53c
...
...
@@ -716,62 +716,45 @@ regen-makefile:
../sample.makefile.regen
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
-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
;
\
@
if
test
-f
sample-DataInterChange-1.[db]er
;
then
\
for
f
in
sample-DataInterChange-
*
.[db]er
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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
-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
;
\
done
;
done
;
fi
@
if
test
-f
sample-DataInterChange-1.xer
;
then
\
for
f
in
sample-DataInterChange-
*
.xer
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-ixer
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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-[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
;
\
done
;
done
;
fi
@
if
test
-f
sample-DataInterChange-1.per
;
then
\
for
f
in
sample-DataInterChange-[1-9].per
;
do
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-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
;
\
rm
-f
./.tmp.[123].
$$$$
;
\
done
;
done
;
fi
@
if
test
-f
sample-DataInterChange-1-padded.per
;
then
\
for
f
in
sample-
*
-[1-9]-padded.per
;
do
\
pdu
=
`
echo
$$
f |
sed
-E
-e
"s/sample-([A-Za-z-]+)-[0-9].*/
\1
/"
`
;
\
for
b
in
1 17 33 980 8192
;
do
\
echo
"Recoding byte-padded
$$
f into DER into XER and back (
$$
b)..."
;
\
./
${TARGET}
-b
$$
b
-per-padded
-p
$$
pdu
-iper
-oder
$$
f
>
./.tmp.1.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-iber
-oxer
./.tmp.1.
$$$$
>
./.tmp.2.
$$$$
||
exit
2
;
\
./
${TARGET}
-b
$$
b
-p
$$
pdu
-ixer
-oper
./.tmp.2.
$$$$
>
./.tmp.1.
$$$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$$$
||
exit
2
;
\
rm
-f
./.tmp.[12
34
].
$$$$
;
\
done
;
fi
rm
-f
./.tmp.[12].
$$$$
;
\
done
;
done
;
fi
@
echo
================
@
echo
All tests passed
@
echo
================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment