fixed newlines in tests and used length_into in region_arithmetics