new twists
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1341 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/asn1c/tests/check-126.-gen-PER.c b/asn1c/tests/check-126.-gen-PER.c
index db210b4..b28ed79 100644
--- a/asn1c/tests/check-126.-gen-PER.c
+++ b/asn1c/tests/check-126.-gen-PER.c
@@ -242,7 +242,7 @@
mustfail = lastChar == 'P';
compare = lastChar != 'C';
- if(compare && getenv("REGENERATE")) {
+ if((compare && !mustfail) && getenv("REGENERATE")) {
f = fopen(outName, "w");
fwrite(buf, 1, size, f);
fclose(f);
diff --git a/asn1c/tests/data-126/data-126-01.out b/asn1c/tests/data-126/data-126-01.out
index 0f23c82..776f213 100644
--- a/asn1c/tests/data-126/data-126-01.out
+++ b/asn1c/tests/data-126/data-126-01.out
Binary files differ
diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index 4c5414d..912febe 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, 2005, 2006 Lev Walkin <vlm@lionet.info>.
+ * Copyright (c) 2003, 2004, 2005, 2006, 2007 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
diff --git a/tests/126-per-extensions-OK.asn1 b/tests/126-per-extensions-OK.asn1
index c4729d3..26503cd 100644
--- a/tests/126-per-extensions-OK.asn1
+++ b/tests/126-per-extensions-OK.asn1
@@ -14,7 +14,17 @@
PDU ::= SEQUENCE {
...,
str-o IA5String OPTIONAL,
- str-m IA5String
+ str-m IA5String,
+ singl Singleton,
+ pdu-2 PDU-2
+ }
+
+ Singleton ::= SEQUENCE {
+ mandatory IA5String DEFAULT "z"
+ }
+
+ PDU-2 ::= CHOICE {
+ str-p2 IA5String
}
END