Test forward and backward.