Преглед изворни кода

feat(testing): Add MacroManager unit tests and expose get_last_macro

Bernardo Magri пре 1 месец
родитељ
комит
565f37c85a
2 измењених фајлова са 4 додато и 0 уклоњено
  1. 3 0
      include/lumacs/macro_manager.hpp
  2. 1 0
      tests/CMakeLists.txt

+ 3 - 0
include/lumacs/macro_manager.hpp

@@ -26,6 +26,9 @@ public:
     /// @brief Checks if macro recording is currently active.
     [[nodiscard]] bool is_recording_macro() const noexcept { return recording_macro_; }
 
+    /// @brief Retrieves the last recorded macro's key sequences.
+    [[nodiscard]] const std::vector<std::string>& get_last_macro() const noexcept { return last_macro_; }
+
 private:
     EditorCore& core_;
 

+ 1 - 0
tests/CMakeLists.txt

@@ -20,6 +20,7 @@ add_executable(test_runner
     test_window_manager.cpp
     test_kill_ring_manager.cpp
     test_register_manager.cpp
+    test_macro_manager.cpp
 )
 
 target_link_libraries(test_runner PRIVATE