[BZ-978979] add test case demonstrating how negative patterns work
(cherry picked from commit da3478100ef0d131580d6e31f308c5374691a7db)