Fix some tests

- Update output formatting
- Fix non-ASCII in proposed function definitions
- Stable order for function definitions
- Deduplicate function definitions