diff --git a/Makefile b/Makefile index c47228c41..0cbdf7eca 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ build: $(HTML_PAGES) $(TMPDIR) .PHONY: install install: .venv/bin - which brew && brew install asciidoctor || apt install -y asciidoctor + which asciidoctor || (which brew && brew install asciidoctor || apt install -y asciidoctor || sudo pacman -S --needed asciidoctor) .PHONY: update-submodules update-submodules: diff --git a/tests/test_system_requirements.py b/tests/test_system_requirements.py new file mode 100644 index 000000000..d2ba5de73 --- /dev/null +++ b/tests/test_system_requirements.py @@ -0,0 +1,36 @@ +import unittest +from sourcetree import ( + SourceTree, +) + + +class RequirementTestCase(unittest.TestCase): + def test_en_GB_locale_is_installed(self): + sourcetree = SourceTree() + + locales = sourcetree.run_command("locale -a").split("\n") + # debian sudo locale-gen en_GB.UTF-8 && sudo update-locale + # arch : https://wiki.archlinux.org/title/locale + # uncomment en_GB.UTF-8 + + # cd /etc && sudo git diff 3 i have etckeeper installed + """ + diff --git a/locale.gen b/locale.gen + index 2f21f03..210ee98 100644 + --- a/locale.gen + +++ b/locale.gen + @@ -157,7 +157,7 @@ + #en_CA ISO-8859-1 + #en_DK.UTF-8 UTF-8 + #en_DK ISO-8859-1 + -#en_GB.UTF-8 UTF-8 + +en_GB.UTF-8 UTF-8 + #en_GB ISO-8859-1 + #en_HK.UTF-8 UTF-8 + #en_HK ISO-8859-1 + """ + + assert ( + "en_GB.utf8" in locales, + "Lacking en_GB locale. " "This interferes with checks for output.", + )