Closed pacien closed 1 year ago
Thanks for the feedback I'm working on to have dedicated tests for the colors checks, like a test to check a feature symbol is correct then one to test color is present. It won't fix your issue but make it easier to solve it.
Some of the errors from your log will be fixed in next release.
There is a discussion in #166 about _pure_string_width
issue.
@pacien is this still relevant? I will close without feedback in a week
This particular test is now passing. But some other tests now seem to fail with errors related to colours: https://gist.github.com/pacien/62ed9e9caa9ad9cf7d03c3452547a7f5
Disclaimer: I'm not familiar with NixOS
, but when I install in a docker image
❯ docker run --interactive --tty --rm nixos/nix:latest
I don't have any error
bash-5.1# nix --version
nix (Nix) 2.17.0
bash-5.1# nix-channel --update
bash-5.1# nix-build '<nixpkgs>' -A fishPlugins.pure
unpacking channels...
this path will be fetched (0.01 MiB download, 0.03 MiB unpacked):
/nix/store/1lqqh4k1a6p4j5r5a90813q78q5nywa7-fishplugin-pure-4.1.1
copying path '/nix/store/1lqqh4k1a6p4j5r5a90813q78q5nywa7-fishplugin-pure-4.1.1' from 'https://cache.nixos.org'...
/nix/store/1lqqh4k1a6p4j5r5a90813q78q5nywa7-fishplugin-pure-4.1.1
Note that current version is
❯ echo $pure_version
4.7.1
Quoting Édouard Lopez (2023-08-29 17:15:00)
Disclaimer: I'm not familiar with
NixOS
, but when I install in a docker image […]bash-5.1# nix-build '<nixpkgs>' -A fishPlugins.pure unpacking channels... this path will be fetched (0.01 MiB download, 0.03 MiB unpacked): /nix/store/1lqqh4k1a6p4j5r5a90813q78q5nywa7-fishplugin-pure-4.1.1 copying path '/nix/store/1lqqh4k1a6p4j5r5a90813q78q5nywa7-fishplugin-pure-4.1.1' from 'https://cache.nixos.org'... /nix/store/1lqqh4k1a6p4j5r5a90813q78q5nywa7-fishplugin-pure-4.1.1
That's an old pinned version from the stable nixpkgs channel. It still had all its tests disabled from when fishtape 3 wasn't there.
Please try with the following command for the latest-ish:
nix build github:NixOS/nixpkgs/6573f71#fishPlugins.pure --print-build-logs
I obtain 225 passing tests and 10 failing ones (log in previous gist).
What is the user running the test? The mock for _pure_set_color
is only created when the user is nemo
In the PR, the docker image with nixOS, I'm logged with root
so a bunch of test will not run, as does the mock.
I use this check to prevent erasing user config in the case they launch the tests on their machine.
@pacien could you try with #328 ?
fisher install pure-fish/pure@fix/nixos-test-color-issue
Quoting Édouard Lopez (2023-08-30 11:06:42)
What is the user running the test?
It runs under the nixbld*
users inside the Nix build and test sandbox.
Quoting Édouard Lopez (2023-08-30 13:28:53)
@pacien could you try with #328 ?
All passing with this PR, thanks!
closed by #328
Issue
Some
_pure_string_width
tests fail in a test environment without colour support. A workaround could be to disable this test suite when the environment doesn't support colours.Env
Logs