Changeset e0022d2 for tester.c


Ignore:
Timestamp:
Aug 2, 2010, 11:38:03 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
fd03b12
Parents:
30da473
git-author:
David Benjamin <davidben@mit.edu> (07/25/10 18:58:30)
git-committer:
David Benjamin <davidben@mit.edu> (08/02/10 23:38:03)
Message:
Expand tabs first in owl_fmtext_truncate_cols

Although the previous commit already expanded tabs from messages, a
fmtext may still get tabs in it. For instance, a :pexec. So, before
truncating, we expand all tabs.

Also adds a test case with tabs for owl_fmtext_truncate_cols.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    r2b83ad6 re0022d2  
    470470  owl_free(str);
    471471
     472  owl_fmtext_clear(&fm1);
     473  owl_fmtext_append_normal(&fm1, "12\t1234");
     474  owl_fmtext_append_bold(&fm1, "56\n");
     475  owl_fmtext_append_bold(&fm1, "12345678\t\n");
     476
     477  owl_fmtext_clear(&fm2);
     478  owl_fmtext_truncate_cols(&fm1, 4, 13, &fm2);
     479  str = owl_fmtext_print_plain(&fm2);
     480  FAIL_UNLESS("columns correctly truncated",
     481              str && !strcmp(str, "    123456"
     482                                  "5678      "));
     483  owl_free(str);
     484
    472485  /* Test owl_fmtext_expand_tabs. */
    473486  owl_fmtext_clear(&fm1);
Note: See TracChangeset for help on using the changeset viewer.