Configure the build environment first (scripts/env.local.sh or exported
variables), then:
./scripts/dev/run-tests.shThe runner builds and executes:
| Test | What it covers |
|---|---|
tests/testencoding |
Encoding detection and round trips |
tests/testfindasync |
Asynchronous find-in-files cancellation and filters |
tests/testplugins |
Package/manifest parsing, locales, process runtime, timeouts, malformed responses, PascalScript, install/uninstall, unsafe archives and user override |
tests/testtools |
External-tool storage round trip, placeholder expansion, stdin/stdout execution, large input, exit codes, timeout, cancellation and invalid configuration |
tests/testsyntax |
Extended lexer registration, rule validity and filename matching |
tests/testfindfiles |
Find-in-files engine with an explicit directory, mask and query |
testplugins --bundled runs only the four bundled PascalScript examples. It can
be cross-compiled and run under Wine or on another platform to verify the
plugins independently of the process-runtime fixtures:
lazbuild --os=win64 --cpu=x86_64 tests/testplugins.lpi
wine tests/testplugins.exe --bundledtestfindfiles is not a unit assertion suite; it prints a match count and
requires arguments. The runner invokes it as:
./tests/testfindfiles "$ROOT" '*.pas' TyEditorStatic checks:
python3 scripts/dev/check-translations.py
python3 scripts/dev/version.py --check TyEditor.lpi src/version.inc
./scripts/dev/check-hardcoded-paths.shThe translation check expects languages/tyeditor.zh_CN.json to cover every
Tr() string found in the application sources. The hardcoded-path check rejects
machine-specific paths in build/package scripts.
The following checklist is for Linux x86_64/Qt6 unless a platform-specific item says otherwise.
./scripts/build.shfinishes without errors and producesdist/linux-x86_64/TyEditor.- Launch
dist/linux-x86_64/TyEditor: aTTyFormwindow, title-bar menu, one Untitled tab and the status bar appear. - Type text: the title gets
*, and line/column/line count update. - Double-click empty tab-bar space: a new Untitled tab opens.
- Run the binary with two file arguments: both files open in the first instance (or new tabs).
- Create two tabs with unsaved text, then exit from the window close button. There should be no blocking save prompt.
- Restart: both tabs, text, active tab, caret, selection and scroll position return.
- Close one modified tab: Save/Discard/Cancel appears; Cancel keeps it.
- Pin a tab and use Close Others/Close All: the pinned tab is skipped.
- Reopen a closed tab with
Ctrl+Shift+T. - Check
session.jsonandbackups/in the configuration directory. - Kill the process while running; restart and verify the crash-recovery prompt and snapshot restore.
- Open UTF-8 and UTF-8-with-BOM files; status bar encoding is correct.
- Open UTF-16 LE/BE with BOM, GBK, Big5, Shift-JIS and EUC-KR files.
- Reload a legacy file with the correct encoding from the status bar; text is readable and saving preserves the chosen encoding.
- Convert a buffer to UTF-8 and save; verify with an external tool.
- Change CRLF to LF/CR and inspect the saved file; open a mixed-EOL file and verify the status shows Mixed.
Ctrl+Fpre-fills selected text or the current word.- Exercise case, whole-word, regex, wrap and selection-only options.
- Find All lists matches; double-clicking a result jumps to it.
Ctrl+Hreplaces one or all matches; undo still works.Ctrl+Shift+Fsearches a directory with a mask and subdirectories.- During a large search, the UI stays responsive; Stop prevents further results; results export to text/JSON.
Ctrl+Shift+Hasks for confirmation before replacing in files and preserves per-file encoding/EOL.
- Test line duplicate/delete/move, indent/unindent, comment toggle, case changes, sort, deduplicate, trim, join/split and multi-caret.
- Toggle comment in Pascal, SQL, PowerShell, LaTeX and YAML; verify the prefix matches the lexer.
- Add/remove bookmarks, jump next/previous, use the bookmark list and bookmark groups; restart and verify persistence.
- Record a macro, play it once and N times, save/load JSON, and play a bound
macro with
Ctrl+F9. - Go to matching bracket and go to line.
- Open files for Java, TypeScript, TSX, Go, Rust, Kotlin, Swift, Objective-C, Scala, Dart, Ruby, Perl, PowerShell, R, SQL, YAML, TOML, Dockerfile, Makefile, CMake, Diff/Patch, GraphQL, Protobuf, Terraform, Nix, LaTeX, RST, AsciiDoc, Groovy, Julia, Haskell, Clojure, Elixir, Erlang, F#, VB.NET, Zsh and Fish.
- Confirm the status bar language and filename-based selection.
- Check keywords, types, constants, strings, comments, numbers and operators.
- Switch language manually and disable highlighting; verify Plain text.
- Open
Makefile,DockerfileandCMakeLists.txtby full filename. - Verify unknown extensions use Plain text and do not freeze the editor.
- Toggle word wrap, whitespace, line numbers, folding, ruler, bookmark margin, minimap and micromap.
F8opens the read-only document map; scrolling it does not edit or change the primary buffer; closing it leaves the document intact.- Switch all seven editor color schemes and both light/dark palettes; syntax colors and selection/current-line colors update without restart.
- Switch TyControls interface themes; main window and Find/Replace dialogs update.
- Test zoom, full screen, always on top and tab pinning.
Prerequisite: python3 is still used by the process-runtime test fixtures
(slow, badresponse and override). The bundled plugins use PascalScript and
need no external interpreter; the PascalScript package must be installed in
Lazarus.
- Open Plugins: Base64 Tools, Text Tools, Caesar Cipher and JSON Formatter are listed and enabled on every platform.
- Select text and run Base64 Encode; selection is replaced. Run Decode on the result and verify the original text returns.
- Run Text Tools > Trim Trailing Spaces on a document; line endings are preserved. Run Caesar Cipher > Encrypt then Decrypt on a selection and verify the original text returns.
- Run JSON Formatter > Format JSON and change the indentation/sort options; verify the option dialog and localized labels. Run it on invalid JSON and verify that the error message is shown.
- Run Base64 Tools > Decode on invalid Base64 and verify the error message.
- Install
dist/plugins/sample.base64-1.0.0.typluginthrough Manage Plugins...; verify user-override behavior, disable/enable, reload and uninstall. Confirm the security prompt for user plugins. - Verify a PascalScript package runs, reports a localized message and can be cancelled from the progress dialog.
- Break a manifest or remove its
command; Plugin Errors reports it and the rest of the plugin menu still works. - Set a small
timeout_msand a blocking process plugin; verify it is terminated and an error dialog appears. Verify the UI remains responsive during execution. - Verify unknown response actions do not crash the editor and
message/logactions behave as documented. Verify zh_CN fallback for a package with onlyen.json.
- Open Tools: it lists Manage Tools... and Reload Tools, plus No tools configured when the list is empty.
- Create a tool with command
sort, input Selection, output Replace selection. Select several lines, run it and verify they are sorted; run it with no selection and verify the explanatory error. - Create a tool with command
echo, arguments${file},${line},${col},${encoding}and${eol}, input None, output Show in a window. Verify the values, that the window is read-only, and that Copy works. - Create a tool with command
cat, argument${inputfile}, input Document and output Show in a window; verify the document text appears. - Create a tool with command
sleep, argument5, timeout 1 second: verify it is terminated and an error dialog appears. Repeat and press Cancel. - Create a tool with command
false: verify the exit code and standard error are reported. Disable a tool and confirm it disappears from the menu; reorder tools and confirm the menu order follows. - Break
tools.jsonand use Reload Tools: Tool Errors lists the problem, valid tools still load. Verify Save before saves a modified document. Verify insert/replace outputs mark the document modified.
- Remove the configuration directory and start with
LANG=zh_CN.UTF-8: the UI is Chinese withlanguage: auto. - Start with
LANG=en_US.UTF-8: the UI is English. - Preferences lists
auto, English and Simplified Chinese; choosing one and restarting applies it. - Add
languages/tyeditor.ja.jsonwith one translation; Preferences discovers the new language automatically. - Check that new plugin, tool, print and settings strings are translated in the Chinese UI.
- Build
win32andwin64; launch the.exeon Windows or Wine; check the icon, resources and opening a file from Explorer/command line. - Build the Windows installer with
ISCC; install, verify the optional.txtassociation and that uninstalling keeps%APPDATA%\TyEditor. - Build
macos(ormacos-x86_64/macos-aarch64); open each.appon its matching architecture, verifydata/,languages/and icons are insideContents/Resources/; unsigned first launch may require Finder’s Open. - Build
linux-aarch64; checklibQt6Pas.so*is present and the binary starts with$ORIGINRUNPATH on an aarch64 system. - Install the Linux desktop entry with
scripts/package/install-desktop.shand verify the menu entry and icon.
- Open a long document with tabs and long lines; run File > Print Preview. Verify pagination, wrapping, line numbers, header/footer and margins.
- Change font, font size, syntax highlighting, margins and page options in the preview's right-hand panel; verify the preview and page count update immediately. Change the same values in Preferences > Printing and verify a new preview uses them.
- Select several lines and print/preview; in the preview enable Print selection only and verify the selected text (not the whole document) appears. For direct printing, answer Yes to the selection prompt.
- Open the system print dialog from File > Print... and from the preview's Print... button; cancel and verify TyEditor remains usable. If no printer is configured, verify the explanatory message instead of a crash.
- Toggle line numbers, wrapping and header/footer and verify the preview updates after reopening it.
- Open Settings > Keyboard Shortcuts...; verify commands are grouped by menu, with plugin commands and enabled tools in their own groups.
- Assign a new combination, close and reopen the dialog, then restart TyEditor and verify the menu shows the saved combination.
- Try to assign a shortcut already used by several commands; verify every conflict is listed. Cancel the replacement prompt, then repeat and confirm that all conflicting assignments are cleared.
- Edit
settings.jsonby hand to give two commands the same shortcut, reopen the dialog and verify both rows show⚠. - Use Reset Selected and Reset All and verify defaults return.
- Cancel the dialog after changing a shortcut and verify the previous value is restored.
- Verify a plugin command shortcut survives Reload Plugins and a restart. Disable the plugin and verify the setting is retained; enable it again and verify the shortcut is restored.
- Verify an external tool shortcut survives Reload Tools. Disable the tool and verify the shortcut returns when it is enabled again.
- Set a menu command to a key used by a non-menu editor action and verify the warning appears; the menu shortcut should take precedence.
- Open Preferences and switch all five categories; verify the pages scroll when the window is small, and that backup folder shows the effective default path.
- Change search options in Find/Replace and Find in Files, close both dialogs, restart TyEditor and verify the last-used options are restored.
- On macOS, verify Preferences... (
Cmd+,) and Keyboard Shortcuts... (Cmd+Alt+K) appear in the application menu and no top-level Settings menu is shown.