1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

tests/gcc: add tests

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-10-05 14:33:23 -05:00
parent 78fda50bd6
commit c2e3f1cacd
3 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{
config = {
programs.gcc = {
enable = true;
};
nmt.script = ''
# Verify no GCC_COLORS environment variable is set when colors is empty
hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh
assertFileNotRegex $hmEnvFile 'GCC_COLORS'
'';
};
}

View file

@ -0,0 +1,4 @@
{
gcc-basic-configuration = ./basic-configuration.nix;
gcc-with-colors = ./with-colors.nix;
}

View file

@ -0,0 +1,21 @@
{
config = {
programs.gcc = {
enable = true;
colors = {
error = "01;31";
warning = "01;33";
note = "01;36";
caret = "01;32";
locus = "01";
quote = "01";
};
};
nmt.script = ''
hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh
assertFileExists $hmEnvFile
assertFileRegex $hmEnvFile 'export GCC_COLORS="caret=01;32:error=01;31:locus=01:note=01;36:quote=01:warning=01;33"'
'';
};
}