Mercurial > octave-nkf
changeset 20291:7ab81a9fa065 stable
io.tst: Add tests for printf hex or octal conversion on string inputs
* io.tst: Add tests for printf hex or octal conversion on string inputs
to ensure correct behavior following cset 7fa170cc14fe.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 10 Jun 2015 08:42:11 -0400 |
parents | 507ccf8f10ed |
children | d54aa96abadf |
files | test/io.tst |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/io.tst Tue Jun 09 21:42:10 2015 -0700 +++ b/test/io.tst Wed Jun 10 08:42:11 2015 -0400 @@ -639,3 +639,8 @@ %!assert (sprintf ("%c,%c,%c,%c", "abcd"), "a,b,c,d"); %!assert (sprintf ("%s,%s,%s,%s", "abcd"), "abcd,"); + +%!assert (sprintf ("|%x|", "Octave"), "|4f||63||74||61||76||65|"); +%!assert (sprintf ("|%X|", "Octave"), "|4F||63||74||61||76||65|"); +%!assert (sprintf ("|%o|", "Octave"), "|117||143||164||141||166||145|"); +