Writing xpcshell-based unit tests

For running individual tests, I use a bash script like so:

#!/bin/bash
 
cd ~/moz/trunk/build-dbg/
make SOLO_FILE="$1" -C toolkit/components/places/tests check-one

I copy it into my PATH, and then can run "check.sh test_bookmarks.js" from any directory.

Platform-specific tests

nsIXULRuntime is a good, cross-platform way of figuring out which platform you're on.