|
wxMaxima
|
Regression test for a plain .mac file surviving wxMaxima's open/save round-trip byte-for-byte, exercising the same code Worksheet::ExportToMAC() and MaximaFileIO::OpenMACFile() use (Format::TreeToWXM() with wxm=false and Format::ParseMACContents()). More...
#include <wx/app.h>#include <wx/bitmap.h>#include <wx/dcmemory.h>#include <wx/log.h>#include "CellPointers.h"#include "Configuration.h"#include "WXMformat.h"#include "cells/CellList.h"#include "cells/EditorCell.h"#include "cells/GroupCell.h"#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| SCENARIO ("A tab inside a code cell survives the .mac round-trip byte-for-byte") | |
| wxDECLARE_APP (TestApp) | |
| int | main (int argc, char **argv) |
Regression test for a plain .mac file surviving wxMaxima's open/save round-trip byte-for-byte, exercising the same code Worksheet::ExportToMAC() and MaximaFileIO::OpenMACFile() use (Format::TreeToWXM() with wxm=false and Format::ParseMACContents()).
Before EditorCell kept '\t' as a real character, every tab in a loaded .mac file was silently rewritten to 1-4 spaces the moment it reached an EditorCell (EditorCell::TabExpand(), now gone) - so opening a hand-written or externally generated .mac file with tabs and immediately re-saving it produced a byte-different file. This pins that a tab used for interior alignment in a code cell survives unchanged.