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

Closing the diff viewer must leave the config file alone (GH #2356). More...

#include <wx/app.h>
#include <wx/bitmap.h>
#include <wx/dcmemory.h>
#include <wx/ffile.h>
#include <wx/fileconf.h>
#include <wx/filename.h>
#include <wx/log.h>
#include "Configuration.h"
#include "dialogs/DiffFrame.h"
#include <catch2/catch.hpp>
Include dependency graph for test_DiffFrameConfig.cpp:

Data Structures

class  TestApp
 

Functions

 SCENARIO ("Closing the diff viewer leaves settings changed meanwhile alone")
 
 wxDECLARE_APP (TestApp)
 
int main (int argc, char **argv)
 

Detailed Description

Closing the diff viewer must leave the config file alone (GH #2356).

Each pane of the diff viewer has its own copy of the main window's Configuration. A Configuration that isn't temporary writes all of its settings to the config file when it is destroyed, so closing the viewer used to overwrite anything changed in the main window while it was open with what the config file said when the viewer was opened.

The config file is an in-memory wxFileConfig, so the test neither reads nor changes anything on disk.