Split up JSON db tests, moved magic number to constant.
Added spec for format_compile_command()