rewrite icon indicating copy to clipboard operation
rewrite copied to clipboard

Xpath 'nodes from anywhere' + attribute selection does not work

Open crankydillo opened this issue 1 year ago • 1 comments

What version of OpenRewrite are you using?

main branch

How are you running OpenRewrite?

The following test fails on the last assertThat when added to XPathMatcherTest

    @Test
    void noMatterWhereAttributeSelection() {
        assertThat(match("/dependencies/dependency/artifactId[@scope='compile']", xmlDoc)).isTrue();
        assertThat(match("//artifactId[@scope='compile']", xmlDoc)).isTrue();
        assertThat(match("//dependency/artifactId[@scope='compile']", xmlDoc)).isTrue();
    }

Are you interested in contributing a fix to OpenRewrite?

I always want to, but time is short:( #4269 is currently more concerning for us:)

crankydillo avatar Sep 26 '24 20:09 crankydillo

  • Now that #4532 was merged, these tests succeed :slightly_smiling_face:

DidierLoiseau avatar Oct 06 '24 14:10 DidierLoiseau

Thanks again @DidierLoiseau !

timtebeek avatar Nov 01 '24 23:11 timtebeek