test line detection in cocoa