Jan Wielkiewicz <tona_kosmicznego_smie...@interia.pl> writes:

> The fragment of code I wrote looks like this:
>
> (add-before 'check 'skip-test
>   (lambda _
>     (substitute* "tests/Makefile"
>       (("include $(SRC_PATH)/tests/fate/lavf-container.mak")
>                       "")) #t))
>
> I also made the git checkout writeable.
> Am I doing something wrong? Should I try deleting the test using
> snippet or just skip all tests using #:tests? #f?

The problem here is that “substitute*” expects regular expressions and
“$”, “(”, “)”, and “.” all have special meaning in a regular expression
context, so they need to be escaped.  Escaping is done with a backslash,
but using a backslash in a string in Guile requires another layer of
escaping, so we end up with this expression:

    (add-before 'check 'skip-test
      (lambda _
        (substitute* "tests/Makefile"
          (("include \\$\\(SRC_PATH\\)/tests/fate/lavf-container.mak") ""))
        #t))

(I did not escap the dot here because it can only match a single
character, a literal dot in this case.)

--
Ricardo


Reply via email to