First, For this cable to give you any activity at all, it has to be a "crossover" cable. Second, connecting the two ports in such a way is similar to connecting them to a single hub (since the hub is nothing but a repeater, just like a wire is). So if you have STP running on your switch the loop should be detected and one of the ports will be blocked. If STP is not running, then I think that this will cause a loop and you might have problems.
S0lo is spot on. It would have to be a crossover cable to give you a conection between the ports (unless the switch ports have auto-crossover capability) and if you connected two ports in this way you would get a network loop unless you had spanning tree running to prevent it