Yes, the compass needle will show similar behavior when a magnet is brought closer. As a magnet itself, the needle will align with the external magnetic field, showing attraction or repulsion depending on the poles.
Home/it show the same behaviour if a magnet is brought closer to it