sh: Split off some special behavior into separate regress tests.