1 /* 2 * Copyright (C) 2014 by ARM Ltd. All rights reserved. 3 * 4 * Permission to use, copy, modify, and distribute this software 5 * is freely granted, provided that this notice is preserved. 6 */ 7 8 #include <stdio.h> 9 #include <string.h> 10 #include "check.h" 11 12 const char m[8] = {'M','M','M','M','M','M','M','M'}; 13 main(void)14int main(void) 15 { 16 char buf[20]; 17 sprintf (buf, "%.*s\n", 8, m); 18 CHECK(strcmp(buf, "MMMMMMMM\n") == 0); 19 exit (0); 20 } 21