mirror of
https://github.com/textmate/textmate.git
synced 2026-01-14 17:28:05 -05:00
18 lines
501 B
C++
18 lines
501 B
C++
#include <editor/editor.h>
|
|
|
|
void test_replace_selection_command ()
|
|
{
|
|
static std::string const plistSrc =
|
|
"{ command = '#!/bin/sh\necho Hello';"
|
|
" input = 'document';"
|
|
" output = 'insertAsSnippet';"
|
|
"}";
|
|
|
|
ng::buffer_t buf;
|
|
ng::editor_t editor(buf);
|
|
editor.insert("to be replaced");
|
|
editor.perform(ng::kSelectAll);
|
|
editor.execute_dispatch(boost::get<plist::dictionary_t>(plist::parse(plistSrc)), std::map<std::string, std::string>());
|
|
// OAK_ASSERT_EQ(editor.as_string(), "Hello\n");
|
|
}
|