Most of these tests were in system/extras, but I've added more to cover other cases explicitly mentioned by POSIX. Change-Id: I5e8d77e4179028d77306935cceadbb505515dcde