Skip to content

Conversation

ikappaki
Copy link
Contributor

Hi,

as discussed in #3461, there are a couple of unit tests that fail if ran on GH MS-Windows, which will of benefit to the clojure-ts-mode PR

The purpose of this PR is to fix them. We start by having a run of the tests on GH, observe their failures and fix them in a follow up commit

Thanks

@ikappaki
Copy link
Contributor Author

ok, so windows-latest, 27.2 run failed with the following two errors as expected

========================================
cider-expected-ns returns the namespace matching the given string path

Traceback (most recent call last):
buttercup-fail("%s" "Expected (cider-expected-ns \"/a/foo/bar/baz_utils.clj\")' to be equal' to \"foo.bar.baz-utils\"', but instead it was "a.foo.bar.baz-utils"' which does not match because: (arrays-of-different-length 19 17 "a.foo.bar.baz-utils" "foo.bar.baz-utils" first-mismatch-at 0).")
signal(buttercup-failed "Expected (cider-expected-ns \"/a/foo/bar/baz_utils.clj\")' to be equal' to \"foo.bar.baz-utils\"', but instead it was "a.foo.bar.baz-utils"' which does not match because: (arrays-of-different-length 19 17 "a.foo.bar.baz-utils" "foo.bar.baz-utils" first-mismatch-at 0).")
FAILED: Expected (cider-expected-ns "/a/foo/bar/baz_utils.clj")' to be equal' to "foo.bar.baz-utils"', but instead it was "a.foo.bar.baz-utils"' which does not match because: (arrays-of-different-length 19 17 "a.foo.bar.baz-utils" "foo.bar.baz-utils" first-mismatch-at 0).

========================================
cider-provide-file can handle multibyte characters

Traceback (most recent call last): buttercup-fail("%s" "Expected `(cider-provide-file filename)' to be `equal' to `\"8J+Nuw==\"', but instead it was `\"\"' which does not match because: (arrays-of-different-length 0 8 \"\" \"8J+Nuw==\" first-mismatch-at 0).") signal(buttercup-failed "Expected `(cider-provide-file filename)' to be `equal' to `\"8J+Nuw==\"', but instead it was `\"\"' which does not match because: (arrays-of-different-length 0 8 \"\" \"8J+Nuw==\" first-mismatch-at 0).") FAILED: Expected `(cider-provide-file filename)' to be `equal' to `"8J+Nuw=="', but instead it was `""' which does not match because: (arrays-of-different-length 0 8 "" "8J+Nuw==" first-mismatch-at 0). Ran 423 out of 424 specs, 2 failed, in 26.59s. [00:29.344] Found test `.feature' files: none (0) [00:29.344] Finished erroneously on Mon Oct 16 20:42:59 2023 [00:29.339] 2 Buttercup tests failed Error: Process completed with exit code 1. 

fixes to follow

- cider-expected-ns: can't use a fake `/a` path because it exists on the GH windows machine. - cider-provide-file: can't use `/tmp` as the temp directory becuase it doesn't exist.
@ikappaki
Copy link
Contributor Author

Everything is now passing, fixes are working, next and final step is to remove the job from GHA.

image

@vemv
Copy link
Member

vemv commented Oct 16, 2023

Awesome - I could follow along. Thanks for operating so clearly.

@ikappaki
Copy link
Contributor Author

Awesome - I could follow along. Thanks for operating so clearly.

Thanks. I think we are done here, the test job has been removed from the GHA. The above demonstrated the two fixes work if we are to run the tests in GH.

@vemv vemv merged commit 55e5d22 into clojure-emacs:master Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants