test switch dir