# HG changeset patch # User Mike Miller # Date 1433940131 14400 # Node ID 7ab81a9fa0652a7655ebf8a641eb6dffaf9f7aab # Parent 507ccf8f10ed4500359fc48795bece5be535c8c4 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. diff -r 507ccf8f10ed -r 7ab81a9fa065 test/io.tst --- 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|"); +