namegen: add test and fix off-by-one error
namegen: add another test