add tests for memory_limit in ExternalCommand