To test the comparator, I used the idea of a nightlight which turns on when a light sensitive resistor's resistance drops below a setpoint. The setpoint can be adjusted with a potentiometer. The circuit diagram is shown below.
The comparator compares the voltage at pins 2 and 3 and outputs a high on pin 1 if pin 3 exceeds pin 2. If pin 2 exceeds pin 3, the output on pin 1 is low. For example, if the LDR is at maximum resistance (in the dark), then V2 = 5V (6 Ohm / 16 Ohm) = 1.9V. If the LDR is at minimum resistance (in bright light), then V2 is shorted to ground (0V). Meanwhile, pin 3 may see a constant voltage of 1V (set by the pot). So in the bright light, V3 > V2 and pin 1 is high so there is no voltage drop across the LED which stays off. In the dark V2 > V3, pin 1 is low and the LED turns on.