A government-run company in South Africa says that it has sent the longest freight train ever on a test run.