Test reg edit function