summaryrefslogtreecommitdiff
path: root/tests (unfollow)
Commit message (Collapse)AuthorFilesLines
9 daystests/remembering.go: Pin getopt(3) positional parsingEuAndreh1-0/+10
The first operand ends the options, with or without "--": a wrapped command's option-looking argv tokens are never rewritten. Comes from gobang's ExpandBundles turning positional. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9 daysAccept getopts-style attached -pPROFILE againEuAndreh2-4/+27
Via gobang.ExpandBundles("p:", argv), now that it understands optstring value flags: -pp1 expands to -p p1 before stdlib flag parsing, and nothing after "--" is expanded, so the wrapped command's own argv passes through byte-for-byte. signals.sh goes back to its original attached-form invocations, which now double as the compat test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9 daysRewrite remembering in GoEuAndreh11-58/+902
The shell pipeline (sed | sort | tee | awk | sort | cut | "$@" plus the cut | uniq | awk profile rewrite) becomes a single static binary with the same observable behaviour, pinned by the original ranking.sh, signals.sh and cli-opts.sh suites, now aimed at remembering.bin: - the profile keeps the exact on-disk format, COUNT profile TEXT, byte-sorted with new picks appended at 1 and offered-but-never- picked entries persisted at 0; - the menu stays count-descending with byte-order ties, stdin alone defines what is offered, and duplicate profile lines sum for ranking but collapse to the highest count on rewrite, as sort | uniq -f1 did; - the wrapped command's exit status is forwarded as-is (128+sig for signal deaths), its stderr passes through, and an empty pick learns nothing; - the profile rewrite stays atomic via .tmp plus rename. Per the house CLI conventions, -h/-V/--help/--version are gone (the manpage is the documentation; bad options print the usage on stderr and exit 2), and getopts-style attached option arguments (-pNAME) are not accepted any more --- no script in the wild used them. The project layout follows rot: raw go tool compile/link Makefile, mkdeps.sh-generated deps.mk, white-box unit suite, fuzz target over the profile parse/serialize roundtrip, functional pick roundtrip, a 1M-line ranking benchmark, and a single English asciidoc manpage absorbing the old .5 page; the po4a/aux release machinery goes away. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2024-11-08tests/lib.sh: Remove utils from eutEuAndreh1-22/+0
2023-04-01Revamp code under aux/EuAndreh1-1/+2
2023-03-31tests/ranking.sh: Pick last value to prevent broken pipesEuAndreh1-5/+6
2023-03-31tests/ranking.sh: Uncomment "$ERR" outputEuAndreh1-1/+1
2023-03-31Unmark "lib.sh" files as executablesEuAndreh1-0/+0
2023-03-31Do not depend on m4 for anythingEuAndreh3-51/+48
2022-11-25Refactor: rewrite logic to make it simpler and fasterEuAndreh3-58/+78
2022-11-08src/remembering.in: Remove hyphen between name and versionEuAndreh1-1/+1
Also use the @NAME@ placeholder over the hard-coded "remembering" value. Update tests/clip-opts.sh to match.
2022-11-08Makefile: Remove rules for C filesEuAndreh2-132/+0
2021-09-08src/remembering.in: Add trailing "/remembering" to the value defined in ↵EuAndreh2-10/+11
$XDG_DATA_HOME
2021-09-01Remove tests/install-uninstall.sh in favor of repocheck.shEuAndreh1-49/+0
2021-09-01Refactor C files, split logerr and tests-libEuAndreh2-0/+132
2021-09-01tests/lib.sh: UpdateEuAndreh3-4/+25
2021-06-28git mv tests/tests-lib.sh tests/lib.shEuAndreh5-4/+4
2021-06-28tests/ranking.sh: Add test_pick_inexisting_value, disabledEuAndreh1-0/+35
2021-06-28tests/*.sh: Refactor error messages to be consistent, move helper all helper ↵EuAndreh2-47/+48
funtions to the top
2021-06-27mv {aux => tests}/tests-lib.shEuAndreh5-4/+127
2021-06-27tests/cli-opts.sh: Add N=$LINENOEuAndreh1-0/+21
2021-06-26tests/install-uninstall.sh: Add test for install/uninstallEuAndreh1-0/+49
2021-06-26aux/utils.sh: Remove unused fileEuAndreh2-2/+0
2021-06-26git grep -l '\./remembering' | xargs sed -i ↵EuAndreh3-25/+25
's|\./remembering|./src/remembering|g'
2021-06-13tests/: Fix path to sh lib fileEuAndreh3-3/+3
2021-06-13Move tests/lib.sh -> aux/tests-lib.sh; add fgrep assert variantEuAndreh1-77/+0
2021-06-13tests/cli-opts.sh: Test help flags on different position tooEuAndreh1-0/+16
2021-06-13tests/cli-opts.sh: Refactor tests to use assert_grep_stdout over ↵EuAndreh1-3/+3
assert_grep_stream
2021-06-13tests/cli-opts.sh: Remove duplicated assert_usageEuAndreh1-8/+0
2021-06-08tests/ranking.sh: Move $LANG configuration to inside of the test fileEuAndreh1-0/+1
2021-06-07tests/ranking.sh: Use LANG=C.UTF-8 for consistent sortingEuAndreh1-3/+3
2021-06-06tests/ranking.sh: Add test_utf_commandsEuAndreh1-1/+18
2021-03-12tests/lib.sh: spaces -> tabsEuAndreh1-1/+1
2021-03-10Support --version flagEuAndreh1-1/+13
2021-03-10tests/cli-opts.sh: Use assert_grep_streamEuAndreh1-5/+2
2021-03-07tests/cli-opts.sh: ShellCheckEuAndreh1-1/+1
2021-03-07Add tests for $XDG_DATA_HOME and $HOME environment variablesEuAndreh1-0/+58
2021-02-20tests/signals.sh: Also add missing XDG_DATA_HOMEEuAndreh1-0/+2
2021-02-20cli-opts.sh: Fix sandboxed tests, add $XDG_DATA_HOMEEuAndreh1-0/+2
2021-02-17Refactor tests/lib.shEuAndreh3-13/+48
2021-01-31tests: Use "./remembering" over "sh remembering"EuAndreh3-19/+19
2021-01-31Add (commented) test_really_long_listEuAndreh1-0/+18
2021-01-26remembering: Add -V version flag, add missing docs on -h flagEuAndreh1-0/+17
2021-01-26lib.sh: Limit the amount of bytes output by odEuAndreh1-1/+1
2021-01-26v0.1.1: Allow names with spacesv0.1.1EuAndreh1-3/+25
The test_stdin_is_empty was adapted so it wouldn't exit with status 1. The previous implementation would effectively do: printf '' | grep '' which returns 1, and the test would fail.
2021-01-26remembering: Refactor with awk + sort; make it fasterEuAndreh1-1/+16
2021-01-24remembering: Fix behaviour where STDIN is smaller than profileEuAndreh1-4/+3
Now the profile will be an ever growing list, remembering every possible option ever presented to it. The tests in tests/ranking.sh already expected this behaviour and were broken, but now they work.
2021-01-24tests/ranking.sh: Add more test scenarions (some are now failing)EuAndreh2-3/+96
2021-01-24tests: Add logs of which test is runningEuAndreh4-7/+44
2021-01-24Stop depending on uuidgenEuAndreh3-6/+14