poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add testcase for parsing Strings


From: Jose E. Marchesi
Subject: Re: [PATCH] Add testcase for parsing Strings
Date: Sun, 12 Jan 2020 13:08:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Darshit.

    It was found that the ios_read_string function does not correctly check
    for the EOF condition. This patch adds a test that does 2 things:
    
    1. Ensure that the EOF condition is correctly handled
    2. Ensure that the strings must be NULL terminated to be identified


This is OK for master.
Thanks!
    
    * testsuite/poke.map/maps-arrays-19.pk: New Test
    ---
     testsuite/poke.map/maps-arrays-19.pk | 8 ++++++++
     1 file changed, 8 insertions(+)
     create mode 100644 testsuite/poke.map/maps-arrays-19.pk
    
    diff --git a/testsuite/poke.map/maps-arrays-19.pk 
b/testsuite/poke.map/maps-arrays-19.pk
    new file mode 100644
    index 00000000..565f96e2
    --- /dev/null
    +++ b/testsuite/poke.map/maps-arrays-19.pk
    @@ -0,0 +1,8 @@
    +/* { dg-do run } */
    +/* { dg-data {c*} {0x02 0x20 0x30 0x40  0x66 0x6f 0x6f 0x00   0x62 0x61 
0x72 0x73} } */
    +
    +/* { dg-command { string[2] @ 4#B } } */
    +/* { dg-output  { "\\\[\"foo\"\\\]" } */
    +
    +/* { dg-command { string[] @ 4#B } } */
    +/* { dg-output "\\\[\"foo\"\\\]" } */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]