Ok, the pattern_detector module didn't change the situation. Both ways work fine for me.
The timescale directive changes the simulation time units, so you have to run the simulation for sufficient time to reach the $stop statement. Without the timescale directive, it reaches the $stop statement in about 3800ps (because my ModelSim default time unit is ps). With the timescale directive, it reaches the $stop statement in about 3800ns.
After running the simulation, be sure you've zoomed out to see the entire time axis.
If that doesn't help, please clarify your first message, "the test bench is not working". Describe what goes wrong.