[C-prog-lang-l] Testing input issue

Vladimír Kotal vlada at devnull.cz
Thu Jun 6 09:26:17 CEST 2019


In general there should not be much difference modulo buffering however
that should not impact the outcome.

How exactly do you test for end of input ?


V. Kotal

Dne st 5. 6. 2019 23:13 uživatel Jura Pelc <jirik.pelc1998 at gmail.com>
napsal:

>
> Hi,
> I finished coding Ed Phase 1. I thing (I hope) I have done everything
> according to task. Today I want to start testing and found one issue. The
> first test ended in infinite loop. I found, then the application
> infinitely reading input a executing it.
> When the same input is used in running application it is fine.
>
> I have these construct to gen input
>                 fgets(str, MAX_COMMAND_LENGTH + 1, stdin);
> And command is:
>                 1p
> I let app to print me chars and in both situations it is 49, 112, 10
> So newline char is here and fgets should stop at new line
>
> So my question is: *What is difference between standard input directly
> from console and send by pipe?*
>
>
> --
>
> S pozdravem Jiří Pelc
> Matematicko-fyzikální fakulta
> Univerzita Karlova
> _______________________________________________
> c-prog-lang-l mailing list
> c-prog-lang-l at mff.cuni.cz
> http://mbox.ms.mff.cuni.cz/listserv/listinfo/c-prog-lang-l
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the c-prog-lang-l mailing list