Add set -o name alphabet matrix (mix bash_fixtures.gen seto) - #105
Draft
davydog187 wants to merge 2 commits into
Draft
Add set -o name alphabet matrix (mix bash_fixtures.gen seto)#105davydog187 wants to merge 2 commits into
mix bash_fixtures.gen seto)#105davydog187 wants to merge 2 commits into
Conversation
Enumerate every POSIX and bash set -o/+o name JustBash implements, plus unknown and unsupported names as known_gap, on the same generate / record / test path as flags, printf, and varop. Co-authored-by: Dave Lucia <davelucianyc@gmail.com>
assert supported != [] compared a non-empty list to [] at compile time. Co-authored-by: Dave Lucia <davelucianyc@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #70 item 2 for the
set -o/+oname alphabet only: a generatedseto_matrixsuite in the same generate / record / test path asdate_matrix,printf_matrix,test_matrix,varop_matrix, andflags_matrix.This is not the short-option cluster (
-euo),set -owith no name (that lists every option), the item-3 filesystem-shape × command cube, Oils activation, or CI topology. It does not implement missing options.What was enumerated
mix bash_fixtures.gen setowrites 60 cases (13 POSIX names + 14 bash extras + 3 unknown names) ×{ -o, +o }. Completeness isJustBash.Commands.Set.option_names/0(errexit,nounset,pipefail): a newly implemented name that is not in the POSIX/bash alphabet fails generation, and every such name is generated unmarked.allexporterrexitignoreeofmonitornoclobbernoglobnoexecnolognotifynounsetverbosevixtracebraceexpandemacserrtracefunctracehashallhistexpandhistoryinteractive-commentskeywordonecmdphysicalpipefailposixprivilegednot-an-optionjb-not-an-optionERREXIT(case trap)LC_ALL=C LANG=C set ±o 'name'; echo rc=$?so a wrong exit code is a stdout difference too. Names are quoted so a future unknown stays data.mix bash_fixtures.gen seto --dry-runreportsseto_matrix: 60 cases.mix bash_fixtures.gennow generates date, printf, test, varop, flags, and seto.Recording
Docker was not available on the agent VM. Oracle output was recorded with the same
test/fixtures/runner.shthe Docker task runs, under GNU bash 5.2.21 / Ubuntu 24.04 (uidubuntu, not root), then pretty-printed throughMix.Tasks.BashFixtures.write_json!/2:To re-record through Docker when it is available:
Known gaps (54 of 60)
No cell was omitted. Divergences are
opts.known_gap(excluded from the digest). The fixture runner still executes them with the assertion inverted.6 cells match bash unmarked:
errexit,nounset,pipefail(both-oand+o).rc=1; bash exits 2JustBash.exec/2 did not raise on any cell. No missing
set -ooptions were implemented in this PR — it is the enumeration + harness.Cheap follow-ups the matrix now makes un-skippable
noglob,noclobber,allexport,xtrace/verbosename: invalid option name, exit 2)set -o/+owith no name still lists (or dumpssetcommands); out of this alphabetNot in this PR:
sort -k/cut/od/xxdalphabets, the item-3 FS-shape × command cube, Oils activation, CI topology changes.Tests
All local quality gates passed:
mix compile --warnings-as-errorsmix format --check-formattedmix credo --strict(only the existing intentionalbanned_fixture_applyfinding)mix dialyzer(zero new errors; 13 skipped, same as main)mix test— 2 doctests, 62 properties, 6877 tests, 0 failuresmix test --only suite:seto_matrix— 60 tests, 0 failuresmix bash_fixtures.gen seto --dry-run—seto_matrix: 60 casesmix bash_fixtures.verify seto_matrix— suite soundRelated Issues
Related to #70 (item 2,
set -oname alphabet only; not closing the issue)Type of Change
Testing
mix bash_fixtures.gen seto --dry-run, local runner.sh recording, JustBash vs oracle classification)Checklist
mix formatmix credoand addressed any issues