Add unit tests for the `discontiguous/1` built-in directive