lexemes: improve unit testing

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>