wxMaxima
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
test_EditorCellEscapedParens.cpp File Reference

Tests that the code editor treats a backslash-escaped bracket or quote as an ordinary character (GH #528). More...

#include <wx/app.h>
#include <wx/bitmap.h>
#include <wx/dcmemory.h>
#include <wx/event.h>
#include <wx/log.h>
#include "CellPointers.h"
#include "Configuration.h"
#include "cells/EditorCell.h"
#include "cells/GroupCell.h"
#include <memory>
#include <catch2/catch.hpp>
Include dependency graph for test_EditorCellEscapedParens.cpp:

Data Structures

class  TestApp
 

Functions

 SCENARIO ("Typing the name from GH #528 gives exactly that name")
 
 SCENARIO ("Unescaped brackets are still auto-closed")
 
 SCENARIO ("An escaped closer does not jump over a real one")
 
 SCENARIO ("An escaped quote inside a string does not end the string")
 
 SCENARIO ("Backspace after an escaped opener deletes only the opener")
 
 SCENARIO ("An escaped bracket under the cursor has no partner to highlight")
 
 SCENARIO ("The bracket helpers work at the very start of a cell")
 
 wxDECLARE_APP (TestApp)
 
int main (int argc, char **argv)
 

Detailed Description

Tests that the code editor treats a backslash-escaped bracket or quote as an ordinary character (GH #528).

In Maxima "a\‍(3\]" is a single name; the "(" and "]" in it open and close nothing. The editor's bracket helpers – auto-closing a typed opener, jumping over a typed closer, deleting an empty pair with one Backspace and highlighting the partner of the bracket under the cursor – used to treat them as real brackets, which made such a name hard to type.

Windowless: real GroupCell/EditorCell against a memory-DC Configuration, the test_EditorCellTabs pattern.