bufhub: test: added an extra test and generalized code in preparation for clipboard tests.