Add WS_CAPTION dialog style if CAPTION is specified.
authorNick Clifton <nickc@redhat.com>
Tue, 9 Apr 2002 17:23:19 +0000 (17:23 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 9 Apr 2002 17:23:19 +0000 (17:23 +0000)
Add testcase.

binutils/ChangeLog
binutils/rcparse.y
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/windres/capstyle.rc [new file with mode: 0644]
binutils/testsuite/binutils-all/windres/capstyle.rsd [new file with mode: 0644]

index a1869a9..5dca07d 100644 (file)
@@ -4,6 +4,7 @@
        are quoted.
        Fix typo in BEDIT warning.
        Don't add default dialog style when explicit style specified.
+       Add WS_CAPTION dialog style if CAPTION is specified.
 
        * rclex.l (handle_quotes): "\xhex" encoding in strings corrected.
        (handle_quotes) "\a" escape (used for right justified key
index fcd34cc..4ab9a09 100644 (file)
@@ -412,6 +412,8 @@ styles:
          /* empty */
        | styles CAPTION QUOTEDSTRING
          {
+           dialog.style |= WS_CAPTION;
+           style |= WS_CAPTION;
            unicode_from_ascii ((int *) NULL, &dialog.caption, $3);
          }
        | styles CLASS id
index d4eae76..0430651 100644 (file)
@@ -1,5 +1,9 @@
 2002-04-09  Nick Clifton  <nickc@cambridge.redhat.com>
 
+       * binutils-all/windres/capstyle.rc: New test case: Set default
+       style for captions.
+       * binutils-all/windres/capstyle.rsd: Expected output.
+
        * binutils-all/windres/deflang.rc: New test case: Check default
        language.
        * binutils-all/windres/deflang.rsd: Expected output.
diff --git a/binutils/testsuite/binutils-all/windres/capstyle.rc b/binutils/testsuite/binutils-all/windres/capstyle.rc
new file mode 100644 (file)
index 0000000..238d21e
--- /dev/null
@@ -0,0 +1,5 @@
+101 DIALOG DISCARDABLE  0, 0, 186, 95
+CAPTION ""
+BEGIN
+    DEFPUSHBUTTON "OK",1,129,7,50,14
+END
diff --git a/binutils/testsuite/binutils-all/windres/capstyle.rsd b/binutils/testsuite/binutils-all/windres/capstyle.rsd
new file mode 100644 (file)
index 0000000..ad3d94f
--- /dev/null
@@ -0,0 +1,8 @@
+ 0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+ 0010 00000000 00000000 00000000 00000000  ................
+ 0020 36000000 20000000 ffff0500 ffff6500  6... .........e.
+ 0030 00000000 10100904 00000000 00000000  ................
+ 0040 0000c880 00000000 01000000 0000ba00  ................
+ 0050 5f000000 00000000 01000150 00000000  _..........P....
+ 0060 81000700 32000e00 0100ffff 80004f00  ....2.........O.
+ 0070 4b000000 00000000                    K.......