aboutsummaryrefslogtreecommitdiff
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Partially undo 7bb30b4d8ec7fdb24b23b02f04897d9b0480056fEuAndreh2022-01-211-1/+1
| | | | | | | | | | | | Pandoc doesn't handle files with diacritics properly, as can be seen in: $ git notes --ref=refs/notes/ci-logs show 014d4b731abab519c50fe4c7dec94ce1291d2716 | grep pandoc pandoc: /tmp/uuid-tmpname.diacritic and spaces.2e6006db-7196-3795-135a-4a4e5a8e7d4d: openBinaryFile: invalid argument (invalid character) I'll stick with spaces only, and when I eventually replace Pandoc with something smaller and simpler (as seen in #td-e8d9a644-ead4-af05-8582-eef22af90633), I'll return to this issue, and inject diacritics back.
* {aux,tests}/lib.sh: Use UUIDs for tmpnames to remove dependency on m4EuAndreh2022-01-211-2/+1
|
* Add diacritic and spaces to mk{s,d}temp paths to enforce that everything ↵EuAndreh2022-01-201-1/+2
| | | | works with it
* {aux,tests}/lib.sh: Use -n1 instead of -1 for head commandEuAndreh2022-01-161-1/+1
|
* Replace git.euandreh.xyz/xxx with euandreh.xyz/xxx.gitEuAndreh2021-10-111-2/+2
|
* tests/: Copy files to temp directory to avoid messing with existing ↵EuAndreh2021-10-022-2/+12
| | | | | | generated files As the tests do a "make clean", which would erase the existing generated files.
* tests/cli-opts.sh: Recover test_langs()EuAndreh2021-10-021-8/+79
|
* Adapt installation to new i18n.EuAndreh2021-09-201-69/+0
| | | | | Use the locale files over the locale variables. Adapt the "install" and "uninstall" targets to it, and remove the locale test.
* tests/lib.sh: Make error reporting consistentEuAndreh2021-08-131-7/+8
|
* mv tests/tests-lib.sh tests/lib.shEuAndreh2021-08-053-2/+2
|
* Remove extra \\ after | in line breaksEuAndreh2021-07-271-2/+2
| | | | Implements #task-1f103822-c865-254c-f6b6-4968f2fb473e.
* src/, tests/: Stick to 80 columns with 8-chars wide tabsEuAndreh2021-07-263-6/+13
|
* aux/lib.sh: Add mkstemp and mkdtemp, and copy uuid overEuAndreh2021-07-153-56/+73
| | | | | | | | | | | | | | | The tests were relying on the unspecified and non-standartized behaviour of "mktemp". Now they use "mkstemp()", a shim sh function to provide the expected behaviour, and an accompanying "mkdtemp()" function is also defined. To further decouple from specific implementations and OS-behaviours and quirks, a aux/lib.sh file containing both those functions was added. Its purpose is to also allow code under aux/ to not depend on specific behaviour. "mkdtemp()" had to be replicated in aux/ci/ci-build.sh, since it runs outside the repository.
* tests/install-uninstall.sh: Remove in favor of aux/workflow/installcheck.shEuAndreh2021-07-151-49/+0
|
* git mv aux/tests-lib.sh tests/EuAndreh2021-06-274-3/+126
|
* src/git-permalink.in: Return 2 on unrecognized CLI optionEuAndreh2021-06-271-4/+2
|
* tests/install-uninstall.sh: Allow git-permalink to already be installed; ↵EuAndreh2021-06-261-12/+8
| | | | laxer assertions on STDERR
* tests/*.sh: Print line number, STDOUT and STDERR when test failsEuAndreh2021-06-263-0/+32
|
* mv src/git-permalink.sh.in src/git-permalin.inEuAndreh2021-06-251-14/+14
| | | | | Mostly to avoid the conflict of the ".sh" built-in rule in the Makefile.
* Fix tests: git grep -l 'sh git-permalink' | xargs sed -i 's|sh ↵EuAndreh2021-06-231-14/+14
| | | | git-permalink|sh src/git-permalink.sh|g'
* tests/remotes.sh: Supress output of git configEuAndreh2021-06-221-2/+2
|
* tests/cli-opts.sh: Stop testing behaviour of "locale" commandEuAndreh2021-06-221-9/+0
|
* tests/remotes.sh: Conditionally set user.{email,name} to work on new env like CIEuAndreh2021-06-221-1/+11
|
* aux/tests-lib.sh: Add uuid() function, use it on testsEuAndreh2021-06-222-3/+3
|
* src/git-permalink.sh.in, tests/remotes.sh: Address ShellCheck issuesEuAndreh2021-06-221-11/+11
|
* src/git-permalink.sh.in: Fix #task-bebbe847-f552-be4b-b886-70a621162b69EuAndreh2021-06-221-4/+2
| | | | | | | | | | | | | The issue wan't with getopts but with my usage of it (well, now that's obvious that the problem wouldn't be in the implementation, but on how I was using). The problem was on: 1) my confusion on when and where to "shift"; 2) make sure to look for the "--help" and "--version" long flags before getopts, because it doesn't know about long flags. Those fixed, the tests are now working again.
* tests/remotes.sh: AddEuAndreh2021-06-221-0/+176
|
* tests/install-uninstall.sh: AddEuAndreh2021-06-221-0/+49
|
* tests/cli-opts.sh: Use portable "sh git-permalink" over "./git-permalink"EuAndreh2021-06-221-15/+15
|
* tests/cli-opts.sh: Add test_langsEuAndreh2021-06-221-0/+70
|
* src/git-permalink.sh: Translate program output to pt, fr and eoEuAndreh2021-06-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The choice of implementation was very basic: Use strings in the script itself rather than relying on external tools. Compared to a compiled C program using, say, gettext.3, an sh script could also depend on it, but at runtime. An equivalent C code would require the gettext.3 dependency, but at compile time. After compilation, the code required for doing the translation is already on the binary, while an sh script would need gettext.1 to run gettext.1 commands while it executes, such as "gettext -s 'MSG_ABC'". Bash has a very appealing feature: using $"" does a lookup and translates the string. In other words, $"" runs gettext for you, without the script requiring gettext.1, just Bash. As tempting as it was, I chose not to rely on Bash. I preferred the cost of an ad-hoc solution over requiring Bash over POSIX sh. The final solution is simple enough for the git-permalink.1 program, but wouldn't scale for bigger scripts. Strings are placed together for translation, and no external tool is used for this. Due to the way that strings are now given to printf.1, ShellCheck complains a lot about those strings, alonside saying that the string translation variables are unused. They actually are used, but hidden behind an eval. Overall I'm satisfied with the solution, but I probably won't follow the same path for the manpages, and will choose something like po4a for it, instead.
* tests/cli-opts.sh: Remove behaviour testEuAndreh2021-06-121-25/+0
| | | | | | | | The test that was removed relies on how the repository was clone. For example, the CI clone the repository as a remote folder, and uses that for the origin remote. The test fails because of that, and instead of trying to fix it, I removed it.
* Revert "tests/xdg-open: Remove unused file"EuAndreh2021-06-122-0/+10
| | | | | | | This reverts commit d3faf9644490a191a16c148a3f4f865b730e5188. The file was not actually unused, but used in tests to avoid side effects when running them.
* src/git-permalink.sh: Fix bad treatment of -p flagEuAndreh2021-06-121-2/+12
|
* tests/xdg-open: Remove unused fileEuAndreh2021-06-122-9/+0
|
* Add initial version of tests/cli-opts.sh testsEuAndreh2021-06-122-0/+115
|
* Add stup tests/cli-opts.shEuAndreh2021-06-121-0/+0