test pattern rule