1 /* test_human_readable.c - Expose lib/lib.c human_readable() for testing. 2 * 3 * Copyright 2015 Rob Landley <rob (at) landley.net> 4 5 USE_TEST_HUMAN_READABLE(NEWTOY(test_human_readable, "<1>1ibs", TOYFLAG_BIN)) 6 7 config TEST_HUMAN_READABLE 8 bool "test_human_readable" 9 default n 10 help 11 usage: test_human_readable [-sbi] NUMBER 12 */ 13 14 #define FOR_test_human_readable 15 #include "toys.h" 16 17 void test_human_readable_main(void) 18 { 19 char *c; 20 21 human_readable(toybuf, strtoll(*toys.optargs, &c, 0), toys.optflags); 22 printf("%s\n", toybuf); 23 } 24