Tests from reference manual examples