On 8/31/19 11:31 PM, enh via Toybox wrote:
> I think when I wrote this I tested the named escapes like \n and hex
> escapes, and when I found \x wasn't supported I didn't even think of
> octal. And I only learned about \c when I was looking at echo and printf
> to compare their escape implementations a few weeks back.

I was fixing this by implementing octal escapes, I just haven't gotten back to
that tab yet. :)

> Add the missing escapes and corresponding tests.

I'm kinda frustrated that we've already implemented \c support twice elsewhere,
and it's not sharing code. :(

$ grep "'c'" toys/*/{echo,printf}.c
toys/posix/echo.c:        else if (slash=='c') return;
toys/posix/printf.c:  if (*ptr == 'c') xexit();
toys/posix/printf.c:        } else if (c == 'c') printf(toybuf, wp[0], wp[1], 
*aa);

I should take a look at that...

Yay tests,

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to