Changeset e30ed92 for tester.c


Ignore:
Timestamp:
Aug 17, 2009, 10:03:53 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
14acbbd
Parents:
8bce750
git-author:
Nelson Elhage <nelhage@mit.edu> (08/17/09 22:03:45)
git-committer:
Nelson Elhage <nelhage@mit.edu> (08/17/09 22:03:53)
Message:
skiptokens: Handle quotes more correctly.

This fixes ctl's bug about not being able to bind the ' key. In
addition, add some tests for skiptokens.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    r8bce750 re30ed92  
    7070  FAIL_UNLESS("expand_tabs 3",
    7171              !strcmp("                2 tabs", owl_text_expand_tabs("\t\t2 tabs")));
     72
     73  FAIL_UNLESS("skiptokens 1",
     74              !strcmp("world", skiptokens("hello world", 1)));
     75
     76  FAIL_UNLESS("skiptokens 2",
     77              !strcmp("c d e", skiptokens("a   b c d e", 2)));
     78
     79  FAIL_UNLESS("skiptokens 3",
     80              !strcmp("\"b\" c d e", skiptokens("a \"b\" c d e", 1)));
     81
     82  FAIL_UNLESS("skiptokens 4",
     83              !strcmp("c d e", skiptokens("a \"b\" c d e", 2)));
     84
     85  FAIL_UNLESS("skiptokens 5",
     86              !strcmp("c d e", skiptokens("a \"'\" c d e", 2)));
    7287
    7388  /* if (numfailed) printf("*** WARNING: failures encountered with owl_util\n"); */
Note: See TracChangeset for help on using the changeset viewer.