aboutsummaryrefslogtreecommitdiff
path: root/module-test
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-09 07:22:42 +0000
committer_ov4 <ov4@ov4.org>2026-10-09 07:22:42 +0000
commitbeadcf1f0d9cf8b9c0b14683bf40d27c142d33c5 (patch)
treec996d716cad78bb24870996d751715e8387d3024 /module-test
parent091db10e0f5e8e95095f30cef34d51e23fc01abb (diff)
add history load/save
Diffstat (limited to 'module-test')
-rw-r--r--module-test/line_test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/module-test/line_test.cc b/module-test/line_test.cc
index 2ad6f32..a54085c 100644
--- a/module-test/line_test.cc
+++ b/module-test/line_test.cc
@@ -6,6 +6,8 @@
src/line/cursor.cc \
src/line/getter.cc \
src/history.cc \
+ src/path.cc \
+ src/util/string.cc \
-std=c++26 -Iinclude -Ithird_party/magic_enum/include \
-O0 -ggdb3 -fno-omit-frame-pointer -fno-inline -D_GLIBCXX_ASSERTIONS \
-o module-test/line_test.out
@@ -21,12 +23,15 @@
#include "line/cursor.h"
#include "line/getter.h"
#include "line/type.h"
+#include "history.h"
+#include "path.h"
using namespace std;
using namespace ov4;
int main()
{
+ load_history();
while (true)
{
print("shell $ ");
@@ -39,6 +44,8 @@ int main()
disable_raw();
cout << "\n\n\n\n" << endl;
cout << s << endl;
+ if (s == "quit") break;
}
+ save_history();
return 0;
}