tests: get stdin from string

This should make tests fully automatic again.