the register 401 whereby writing inhibition control in a horizontal direction is performed on the other hand writing inhibition control in a vertical direction is performed based on a top erase signal tope signal 425 sent from the print control unit the mask signal 424 the tope signal 425 and the clk signal 421 are inputted to the nor gate 405 when the writing inhibition is released the nor gate 405 outputs the test pattern signal 426 obtained by inverting the clk signal 421 the signal 426 is then outputted through the demultiplexer 412 as the test pattern1 signal 434 to turn on and off the laser a while the laser a is being selected driving of a laser b is inhibited on the other hand while it is being instructed by the sel signal 430 to select the laser b the laser b is turned on and off according to a test pattern2 signal 435 and also driving of the laser a is being inhibited in the same manner as above the sel signal shown in fig9 is generated in an operation according to the flow chart of fig2 to control the sel signal but substituting description of multiplexer 410 for that of multiplexer 310 fig1 shows an example of a test pattern which is outputted when the test pattern data generation circuit operates in the third embodiment.