Question: So I moved some X programs down to the mac, and I'm getting

```
Error: XTEST extension unavailable on '(null)'.

```

from xdotool.

* Does OS X X11 come with XTEST?
* If not, is there a way to add it?

Answer: 
Run the following command in the Terminal:

```
defaults write org.x.X11 enable_test_extensions -boolean true

```

(as per [here](http://xquartz.macosforge.org/trac/wiki/X112.3.2)). Then quit and restart the X server; the XTEST extension should then be available.
Mac has test extension as part of the open source [XQuartz](https://en.wikipedia.org/wiki/XQuartz) project (if installed).

The X11.app was available by default for Mac OS X v10.5-10.7, but since Mountain Lion, Apple dropped dedicated support for X11.app, with users directed to the open source XQuartz project (to which it contributes) instead.

To test if the TEST extension is enabled, try the following commands:

```
$ defaults read org.x.X11
{
    "enable_test_extensions" = 1;
}
$ defaults read org.macosforge.xquartz.X11
{
...
    "enable_test_extensions" = 1;
    "startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
}

```

For downloading instructions, check [XQuartz page](http://xquartz.macosforge.org/landing/).