Unit tests for the XISOSharp.Core library. Uses xUnit to verify the correctness of the C# implementation against the original extract-xiso reference.
- AVL Tree — insertion, balancing, left/right rotations, fetching, traversal (prefix/infix/postfix)
- AVL Tree edge cases — empty trees, duplicate keys, single node, degenerate inserts
- Boyer-Moore — pattern initialization, search, media-enable pattern matching
- Types —
ExtractError,ExtractErrorException,ExtractMode,CreateList - Constants — magic values, header data, offsets, padding constants
- DirEntry — directory entry structure and serialization
- FileTimeHelper — Unix epoch to Windows FILETIME conversion
- Logger — output suppression flags
- XisoReader — header verification and traversal
- XisoInfo — volume metadata, directory listing, entry info lookup
- XisoReader.Tree — recursive tree listing with sizes
- XisoReader.CopyOut — single file and directory extraction
- XisoReader.CopyIn / XisoPatcher — in-place patching: replace/add, table moves, errors, backup,
.xbe,--copy-inCLI - DirectoryEntryTableWriter — table offsets, record encoding, byte-identity with writer output
- XisoReader.ComputeFileHash — MD5 and SHA-256 per-file hashing
- XisoReader.ComputeDirectoryHashes — batch hashing of all files in a directory
- XisoReader.AuditXiso — deep integrity audit (header, tree, sectors, cycles)
- Snapshot —
Fixtures/test_fixture.iso: deterministic create (fileTime: 0) is byte-identical across runs and to the reference; extract/rewrite round-trips match SHA-256 per file - Corruption resilience — truncated tables, manipulated header pointers, out-of-image extents,
uint.MaxValuesizes, invalid filenames, >4 GB inputs fail fast with named errors - Reader gap-closers — multi-sector tables, disc-layout probes, block-device errors, sentinel shapes (line coverage:
XisoReader94.2%,XisoWriter89.6%,AvlTree100%) - Legacy interop — images created by the reference extract-xiso (legacy layout) round-trip through
llCompatextract/list/rewrite - File copier —
XisoFileCopier.CopyExactsize matrix, truncation counts, short-read stitching, pooled buffers, mid-copy cancel, per-chunkFileProgresson copy-out/unpack - Filesystem destinations —
IFilesystem/LocalFilesystem/MemoryFilesystemsemantics, genericUnpackImagebyte-parity with the legacy disk unpack, resume/continue-on-error/cancel/truncation through custom destinations - Image explorer —
XisoExplorerload/navigate/copy-out/hash/XEX/path helpers over.isoand.cso(engine behind the Tester's Explore tab) - Image splitting —
XisoSplittersplit/halves/join round-trips, sector alignment, guards, progress/cancel,split/joinCLI verbs - In-place repair —
XisoRepairerclass-C fixes (reserved bits, tag, separator renames + collision refusal), convergence, backup/dry-run semantics, CISO/split refusals,--repairCLI - Salvage rebuild —
XisoSalvagercarry/drop exactness (forged sizes/sectors, real truncation, cycles, depth gate), CISO→plain ISO, re-salvage stability,--salvage/--repair-outCLI - Executable info —
GetXexInfo/GetXbeInfopath + stream overloads, all-fields parsing, cert bounds, explorer surface, CLI end-to-end - Disc identity —
VolumeInfo.DiscFormatacross RAW/GLOBAL/XGD3/Hybrid/XGD1/unknown layouts - Rebuilt sector-0 images — descriptor at absolute offset 0: probe/verify/volume-info, explorer listing + read stream, filetime, block-device probe, sector-layout used ranges, in-place
CopyInadd/replace/root-table-move, andGetXisoRanges/CreateZarround-trips - Tool locator —
ToolLocatorresolution chain (override → app directory → process directory →PATH), OS-aware file names, blank/unknown handling, bounded-vprobe - CLI surface —
-h/-vflags and the branded banner,--sector-layout/--ranges/--is-optimizedverbs, update-check asset naming - Process runner —
ProcessRunnerexit codes, stdout/stderr capture, per-line callbacks, missing executables, argument validation, cancellation, timeouts - Update checker extras — version parsing, update comparison, RID mapping, cache round-trips/escaping, asset URL lookup
- Output guards / prompt — misplaced-flag detection, input==output refusals (rewrite/rebuild/image), overwrite-prompt flag combinations and responses
- Bug reports / telemetry — report entry points under test hosts, exception-block budgets, environment block lines, stats launch-ping opt-outs
- Internal helpers (
InternalsVisibleTo) — SHA3-256 NIST vectors/chunking/disposal, Latin-1 codec full byte range + overflow-safe range validation, bounded sub-stream window/ownership semantics - Hardening regressions — path-escape names, table-size bounds, all-zero sentinel, zero-size directory listing, split part naming (dotted bases), partial-output cleanup and pre-existing-output preservation (
CreateZar/CompressToCso), offset-image tag repair, same-CWD input==output guard - CLI flag contracts —
--silentorder independence (incl.-v/--help),--file-time/--preserve-attrs/--jobs/--policymode rejection (incl.--jobswith--compress/multi-mode),--ciso-splitfirst-part guard, Wipe/Trim flags-before-positionals - Follow-up regressions —
-c .default output next to the source, colon names through list/tree/rewrite (extract refuses on Windows), audit root-size/extraction parity, header-only sector-layout reservations,build-imagecancellation cleanup, child-offset0xFFFFsentinel guard - Sequential execution — assembly-wide
[CollectionBehavior(DisableTestParallelization = true)]because create/extract mutate the process CWD - GUI command builders (net10.0) —
CliCommandsargv for every verb, flags-before-positionals invariant,CliLocatorversion metadata fallbacks - GUI services (net10.0) — screenshot file naming/folder resolution/collision suffixes and update-check version comparison/release-URL fallback
dotnet test
MIT