Blame view

build3/liba/test/strlcpy.c 249 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
  #include <quiz.h>
  #include <string.h>
  #include <assert.h>
  
  QUIZ_CASE(liba_strlcpy) {
    char * t = "Hello";
    char buffer[16];
    size_t result = strlcpy(buffer, t, 2);
    assert(result == 1);
    assert(buffer[0] == 'H');
    assert(buffer[1] == NULL);
  }