Ninjafix: fix tests after merge and add few test cases for #181