- Timestamp:
- Sep 18, 2010, 3:17:27 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- dc9665a
- Parents:
- 5b68c05
- git-author:
- David Benjamin <davidben@mit.edu> (07/31/10 19:09:41)
- git-committer:
- David Benjamin <davidben@mit.edu> (09/18/10 15:17:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tester.c
re5c9d3de rf7456bc 436 436 owl_fmtext fm1; 437 437 owl_fmtext fm2; 438 owl_regex re; 438 439 char *str; 439 440 … … 527 528 owl_free(str); 528 529 530 /* Test owl_fmtext_line_number. */ 531 owl_fmtext_clear(&fm1); 532 owl_fmtext_append_normal(&fm1, "123\n456\n"); 533 owl_fmtext_append_bold(&fm1, ""); 534 FAIL_UNLESS("lines start at 0", 0 == owl_fmtext_line_number(&fm1, 0)); 535 FAIL_UNLESS("trailing formatting characters part of false line", 536 2 == owl_fmtext_line_number(&fm1, owl_fmtext_num_bytes(&fm1))); 537 owl_regex_create_quoted(&re, "456"); 538 FAIL_UNLESS("correctly find second line (line 1)", 539 1 == owl_fmtext_line_number(&fm1, owl_fmtext_search(&fm1, &re, 0))); 540 owl_regex_cleanup(&re); 541 529 542 owl_fmtext_cleanup(&fm1); 530 543 owl_fmtext_cleanup(&fm2);
Note: See TracChangeset
for help on using the changeset viewer.