Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Programming exercise/challenge
Date: Thu, 10 Dec 2020 20:32:58 -0800
Organization: A noiseless patient Spider
Lines: 167
Message-ID: <86360d2c91.fsf@linuxsc.com>
References: <86wnxwkyol.fsf@linuxsc.com> <86sg8f43fb.fsf@linuxsc.com> <20201209145102.a4adfe0b03a547724b4a7d5b@gmail.com> <86o8j24vt7.fsf@linuxsc.com> <20201210023321.81eb748838edb6118caa3168@gmail.com> <864kku3x2d.fsf@linuxsc.com> <20201210145935.fb46400c8fb61836614602a5@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="d0e6cb8b172339c00630e9a897bd2d9b"; logging-data="14633"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qnQk0pH/YeZ2UbCU3Y7YmytXI/fCRUGI="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:xeTTFxa36mdRSy+7SEc3NONLyhM= sha1:X2Jt7ZfMG9l7dYmuuO7adbMXXJo=
Xref: csiph.com comp.lang.c:157212
Anton Shepelev writes:
> Tim Rentsch:
>
>> If I work up a list of "interesting inputs" would you like
>> to see those? I'm considering doing that but haven't
>> absolutely decided yet.
>
> Yes. It would be a good supplement to the collectioon of
> solutions.
Some cases follow. At the start of each example line is a marker
(==) to indicate it is an example (and which go on for one or
more lines after the ==). End of file is indicated by . A
line marked with ==x is an error example. A line marked as ==~
shows an example that might be accepted as good but doesn't have
to be. None of the example lines have trailing spaces.
Disclaimer: I have tried to be accurate. Forgive me if there are
any mistakes in the labelling. I haven't been as thorough as I
would have liked, but for better or worse here are some cases.
== ''
== 'z'
==x '
==x '
== '\a'
== '\
'
== '\
z'
==x '\
== '\\
a'
==x '\\
== '\\'
== '\\z'
== '\\\a'
==x '\\
yyy'
== '\\
\'
== ""
== "z"
==x "
==x "
== "\a"
== "\
"
== "\
z"
==x "\
== "\\
a"
==x "\\
== "\\"
== "\\z"
== "\\\a"
==x "\\
yyy"
== "\\
\"
==~ /
==~ /\
==~ //
==~ //\
==~ //\
== /z
== /\
z
== /\
\
z
== //z
== /\
/z
== /\
/\
z
== //\\
z
== //\\z
==x /*
==x /*\
==x /*\
==x /**
==x /**\
==x /**\
== /\
*z*/
== /\
***/
== /\
*\\
*/
== /*z*/
== /***\
/
== /***\*\
/