Revision 176b8de8 src/Tests/config_test.c

View differences:

src/Tests/config_test.c
13 13
  struct tag *cfg_tags;
14 14
  int size=-1, len=-1, dummy=-1, res;
15 15
  
16
  cfg_tags = config_parse("size=10");
17
  res = config_value_int(cfg_tags, "size", &size);
16
  cfg_tags = grapes_config_parse("size=10");
17
  res = grapes_config_value_int(cfg_tags, "size", &size);
18 18
  printf("%d: Is %d = %d?\n", res, size, 10);
19 19
  free(cfg_tags);
20 20

  
21
  cfg_tags = config_parse("len=5,size=10");
22
  res = config_value_int(cfg_tags, "size", &size);
23
  res = config_value_int(cfg_tags, "len", &len);
21
  cfg_tags = grapes_config_parse("len=5,size=10");
22
  res = grapes_config_value_int(cfg_tags, "size", &size);
23
  res = grapes_config_value_int(cfg_tags, "len", &len);
24 24
  printf("%d: Is %d = %d?\n", res, size, 10);
25 25
  printf("%d: Is %d = %d?\n", res, len, 5);
26
  res = config_value_int(cfg_tags, "blah", &dummy);
26
  res = grapes_config_value_int(cfg_tags, "blah", &dummy);
27 27
  printf("%d: Is %d = ...?\n", res, dummy);
28 28
  free(cfg_tags);
29 29

  

Also available in: Unified diff