pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:13400:   test_eq(sprintf("%4H", ""),"\0\0\0\0")   test_eq(sprintf("%4H", "hello"),"\0\0\0\5hello")   test_eq(sprintf("%-4H", ""),"\0\0\0\0")   test_eq(sprintf("%-4H", "hello"),"\5\0\0\0hello")   test_do(sprintf("%9H", "x"*300););      test_eval_error(return sprintf("%H", "\x100");)   test_do(return sprintf("%1H", "x"*255);)   test_eval_error(return sprintf("%1H", "x"*256);)    + define(test_object_sprintf, [[ +  test_eq(sprintf("%"+$1, OBJ), $1); +  test_eq(sprintf("%"+$1+"%<"+$1, OBJ), $1 + $1); +  test_eq(sprintf("%[1]"+$1+"%[0]"+$1, OBJ, OBJ), $1 + $1); +  ]]);   test_do(add_constant("OBJ",class { string _sprintf(int t) { return sprintf("%c",t); } }() )) - test_eq(sprintf("%t", OBJ),"t") - test_eq(sprintf("%c", OBJ),"c") - test_eq(sprintf("%H", OBJ),"H") - test_eq(sprintf("%b", OBJ),"b") - test_eq(sprintf("%o", OBJ),"o") - test_eq(sprintf("%d", OBJ),"d") - test_eq(sprintf("%u", OBJ),"u") - test_eq(sprintf("%x", OBJ),"x") - test_eq(sprintf("%X", OBJ),"X") - test_eq(sprintf("%e", OBJ),"e") - test_eq(sprintf("%f", OBJ),"f") - test_eq(sprintf("%g", OBJ),"g") - test_eq(sprintf("%E", OBJ),"E") - test_eq(sprintf("%G", OBJ),"G") - test_eq(sprintf("%F", OBJ),"F") - test_eq(sprintf("%O", OBJ),"O") - test_eq(sprintf("%s", OBJ),"s") - test_eq(sprintf("%q", OBJ),"q") + test_object_sprintf("t") + test_object_sprintf("c") + test_object_sprintf("H") + test_object_sprintf("b") + test_object_sprintf("o") + test_object_sprintf("d") + test_object_sprintf("u") + test_object_sprintf("x") + test_object_sprintf("X") + test_object_sprintf("e") + test_object_sprintf("f") + test_object_sprintf("g") + test_object_sprintf("E") + test_object_sprintf("G") + test_object_sprintf("F") + test_object_sprintf("O") + test_object_sprintf("s") + test_object_sprintf("q")   test_do(add_constant("OBJ"))      dnl / : ; ^ _ > hasn't been tested   test_eval_error(return sprintf("%d");)      END_MARKER