Add tests for span functions