mirror of
https://github.com/tstack/lnav.git
synced 2024-09-11 13:05:51 +03:00
[tests] add some more tests for the views vtabs
This commit is contained in:
parent
6712a33163
commit
773cc3e049
@ -727,7 +727,7 @@ execute_init_commands(
|
||||
return;
|
||||
}
|
||||
|
||||
db_label_source& dls = lnav_data.ld_db_row_source;
|
||||
auto& dls = lnav_data.ld_db_row_source;
|
||||
int option_index = 1;
|
||||
|
||||
log_info("Executing initial commands");
|
||||
|
@ -1200,6 +1200,9 @@ com_save_to(exec_context& ec,
|
||||
|
||||
vis_line_t top = tc->get_top();
|
||||
vis_line_t bottom = tc->get_bottom();
|
||||
if (lnav_data.ld_flags & LNF_HEADLESS && tc->get_inner_height() > 0_vl) {
|
||||
bottom = tc->get_inner_height() - 1_vl;
|
||||
}
|
||||
auto y = 0_vl;
|
||||
std::vector<attr_line_t> rows(bottom - top + 1);
|
||||
attr_line_t ov_al;
|
||||
|
@ -665,13 +665,17 @@ CREATE TABLE lnav_view_filters (
|
||||
case SQLITE_FAIL:
|
||||
case SQLITE_ABORT:
|
||||
tab->zErrMsg = sqlite3_mprintf(
|
||||
"filter already exists -- %s",
|
||||
"filter already exists -- :%s",
|
||||
new_cmd.c_str());
|
||||
return conflict_mode;
|
||||
case SQLITE_IGNORE:
|
||||
return SQLITE_OK;
|
||||
case SQLITE_REPLACE:
|
||||
filter->set_enabled(pf->is_enabled());
|
||||
if (filter->is_enabled() != pf->is_enabled()) {
|
||||
filter->set_enabled(pf->is_enabled());
|
||||
tss->text_filters_changed();
|
||||
tc.set_needs_update();
|
||||
}
|
||||
return SQLITE_OK;
|
||||
default:
|
||||
break;
|
||||
@ -692,7 +696,7 @@ CREATE TABLE lnav_view_filters (
|
||||
case SQLITE_FAIL:
|
||||
case SQLITE_ABORT:
|
||||
tab->zErrMsg = sqlite3_mprintf(
|
||||
"A SQL filter already exists");
|
||||
"A SQL expression filter already exists");
|
||||
return conflict_mode;
|
||||
case SQLITE_IGNORE:
|
||||
return SQLITE_OK;
|
||||
@ -776,10 +780,11 @@ CREATE TABLE lnav_view_filters (
|
||||
filter_lang_t lang,
|
||||
sqlite3_value* pattern_val)
|
||||
{
|
||||
auto* mod_vt = (vtab_module<lnav_view_filters>::vtab*) tab;
|
||||
auto view_index = lnav_view_t(rowid >> 32);
|
||||
auto filter_index = rowid & 0xffffffffLL;
|
||||
textview_curses& tc = lnav_data.ld_views[view_index];
|
||||
text_sub_source* tss = tc.get_sub_source();
|
||||
auto& tc = lnav_data.ld_views[view_index];
|
||||
auto* tss = tc.get_sub_source();
|
||||
auto& fs = tss->get_filters();
|
||||
auto iter = fs.begin();
|
||||
for (; iter != fs.end(); ++iter) {
|
||||
@ -788,7 +793,7 @@ CREATE TABLE lnav_view_filters (
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<text_filter> tf = *iter;
|
||||
auto tf = *iter;
|
||||
|
||||
if (new_view_index != view_index) {
|
||||
tab->zErrMsg
|
||||
@ -842,7 +847,31 @@ CREATE TABLE lnav_view_filters (
|
||||
1, &pattern_val, 0);
|
||||
auto pf = std::make_shared<pcre_filter>(
|
||||
type, pattern.first, tf->get_index(), pattern.second.release());
|
||||
|
||||
auto conflict_mode = sqlite3_vtab_on_conflict(mod_vt->v_db);
|
||||
auto new_cmd = pf->to_command();
|
||||
for (auto& filter : fs) {
|
||||
if (filter->to_command() == new_cmd) {
|
||||
switch (conflict_mode) {
|
||||
case SQLITE_FAIL:
|
||||
case SQLITE_ABORT:
|
||||
tab->zErrMsg = sqlite3_mprintf(
|
||||
"filter already exists -- :%s",
|
||||
new_cmd.c_str());
|
||||
return conflict_mode;
|
||||
case SQLITE_IGNORE:
|
||||
return SQLITE_OK;
|
||||
case SQLITE_REPLACE:
|
||||
if (filter->is_enabled() != pf->is_enabled()) {
|
||||
filter->set_enabled(pf->is_enabled());
|
||||
tss->text_filters_changed();
|
||||
tc.set_needs_update();
|
||||
}
|
||||
return SQLITE_OK;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
*iter = pf;
|
||||
}
|
||||
if (!enabled) {
|
||||
@ -964,7 +993,7 @@ CREATE TABLE lnav_view_files (
|
||||
tab->zErrMsg = sqlite3_mprintf(
|
||||
"Rows cannot be inserted into the lnav_view_files table");
|
||||
return SQLITE_ERROR;
|
||||
};
|
||||
}
|
||||
|
||||
int update_row(sqlite3_vtab* tab,
|
||||
sqlite3_int64& rowid,
|
||||
|
@ -202,6 +202,7 @@ dist_noinst_SCRIPTS = \
|
||||
test_sql_search_table.sh \
|
||||
test_sql_str_func.sh \
|
||||
test_sql_time_func.sh \
|
||||
test_sql_views_vtab.sh \
|
||||
test_sql_xml_func.sh \
|
||||
test_tui.sh \
|
||||
test_view_colors.sh \
|
||||
@ -398,6 +399,7 @@ TESTS = \
|
||||
test_sql_search_table.sh \
|
||||
test_sql_str_func.sh \
|
||||
test_sql_time_func.sh \
|
||||
test_sql_views_vtab.sh \
|
||||
test_sql_xml_func.sh \
|
||||
test_tui.sh \
|
||||
test_data_parser.sh \
|
||||
|
@ -132,8 +132,6 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a1123427c31c022433d66d05ee5d5e1c8ab415e4.out \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a190bfc279fa046a823864f1484f899d27d22953.err \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a190bfc279fa046a823864f1484f899d27d22953.out \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a2690827f648d15ee64d1bdc8638f0277f175b95.err \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a2690827f648d15ee64d1bdc8638f0277f175b95.out \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a5742238bad948b1372d32f7a491f03fa4e8b711.err \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a5742238bad948b1372d32f7a491f03fa4e8b711.out \
|
||||
$(srcdir)/%reldir%/test_cmds.sh_a6c431f2871ea96cfdf4e11465b3bca543c7b678.err \
|
||||
@ -326,6 +324,58 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_pretty_print.sh_a6d9042e5e95f2a49194bd80c1eed154813ddf41.out \
|
||||
$(srcdir)/%reldir%/test_pretty_print.sh_cd361eeca7e91bfab942b75d6c3422c7a456a111.err \
|
||||
$(srcdir)/%reldir%/test_pretty_print.sh_cd361eeca7e91bfab942b75d6c3422c7a456a111.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_0fa3663a45aca6a328cb728872af7ed7ee896f1c.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_0fa3663a45aca6a328cb728872af7ed7ee896f1c.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_182ae9244db314a953af2bee969726e381bc5a32.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_182ae9244db314a953af2bee969726e381bc5a32.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_281af24141680330791db7f7c5fa70833ce08a6b.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_281af24141680330791db7f7c5fa70833ce08a6b.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_35703b13990785632cca82123fb3883797959c0b.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_35703b13990785632cca82123fb3883797959c0b.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_442cc58676590a3604d5c2183f5fe0a75c98351a.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_442cc58676590a3604d5c2183f5fe0a75c98351a.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_566fd88d216a44bc1c6e23f2d6f2d0caf99d42f9.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_566fd88d216a44bc1c6e23f2d6f2d0caf99d42f9.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_5f2f7ecb6ab9cbec4b41385b91bd038906b8a7b2.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_5f2f7ecb6ab9cbec4b41385b91bd038906b8a7b2.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_629bde30483e0a6461076e9058f3a5eb81ae0425.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_629bde30483e0a6461076e9058f3a5eb81ae0425.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_630db454054cf92ec9bd0f4e3e83300047f583ff.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_630db454054cf92ec9bd0f4e3e83300047f583ff.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_771af6f3d29b8350542d5c6e98bdbf4c223cd531.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_771af6f3d29b8350542d5c6e98bdbf4c223cd531.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_79ee3f5fe71ccec97b2619d8c1f74ca97ffd2243.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_79ee3f5fe71ccec97b2619d8c1f74ca97ffd2243.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_7de76c174c58d67bf93e8f01d6d55ebb6a023f10.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_7de76c174c58d67bf93e8f01d6d55ebb6a023f10.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_8a43e6657d4f60e68d31eb8302542ca28e80d077.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_8a43e6657d4f60e68d31eb8302542ca28e80d077.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_95c56a9d146ec9a7c2196559d316f928b2ae6ae9.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_95c56a9d146ec9a7c2196559d316f928b2ae6ae9.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_9d101ee29c45cdb8c0f117ad736c9a5dd5da5839.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_9d101ee29c45cdb8c0f117ad736c9a5dd5da5839.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_c43e07df9b3068696fdc8759c7561135db981b38.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_c43e07df9b3068696fdc8759c7561135db981b38.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_cf6c0a9f0f04e24ce1fae7a0a434830b14447f83.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_cf6c0a9f0f04e24ce1fae7a0a434830b14447f83.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_f23e393dbf23d0d8e276e9b7610c7b74d79980f8.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_f23e393dbf23d0d8e276e9b7610c7b74d79980f8.out \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_fc41b6ee90cbf038620151f16d164b361acf82dd.err \
|
||||
$(srcdir)/%reldir%/test_regex101.sh_fc41b6ee90cbf038620151f16d164b361acf82dd.out \
|
||||
$(srcdir)/%reldir%/test_sessions.sh_0300a1391c33b1c45ddfa90198a6bd0a5404a77f.err \
|
||||
$(srcdir)/%reldir%/test_sessions.sh_0300a1391c33b1c45ddfa90198a6bd0a5404a77f.out \
|
||||
$(srcdir)/%reldir%/test_sessions.sh_17b85654b929b2a8fc1705a170ced544783292fa.err \
|
||||
@ -390,8 +440,6 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql.sh_2532083f215ed44630621f18df3dd7b77c06ae10.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_26c0d94d7837792144f2d0f866fb3c12a0bd410d.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_26c0d94d7837792144f2d0f866fb3c12a0bd410d.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_28e23f4e98b1acd6478e39844fd9306b444550c3.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_28e23f4e98b1acd6478e39844fd9306b444550c3.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_2959f0c70fca61a07c6c772f193e73022f7794f1.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_2959f0c70fca61a07c6c772f193e73022f7794f1.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err \
|
||||
@ -408,8 +456,6 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql.sh_4090f96ea11a344c1e2939211da778992dab47d8.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_4629b626c65a85d7a5595571e195b67afca272ba.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_4629b626c65a85d7a5595571e195b67afca272ba.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_50c0b2c93b646b848a017764bde8a4282c556e2d.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_50c0b2c93b646b848a017764bde8a4282c556e2d.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_528e48a03cdfa7cfbe263a6e22a65606247a8a95.err \
|
||||
@ -428,36 +474,22 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql.sh_5fe26fe4fc22f23f8dbe3a6aab394602886f2971.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_662b5f9b17aa69a8e3aa9a18acb30d9acf6e2837.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_662b5f9b17aa69a8e3aa9a18acb30d9acf6e2837.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_6ad9d0adf85c36363f6b24f49950dcdc13dd34ab.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_6ad9d0adf85c36363f6b24f49950dcdc13dd34ab.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_6edb0c8d5323d1b962d90dd6ecdd7eee9008d7b5.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_6edb0c8d5323d1b962d90dd6ecdd7eee9008d7b5.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_764ea85863d4f0ea3b7cb40850ac7c8fde682d57.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_764ea85863d4f0ea3b7cb40850ac7c8fde682d57.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_81ffd4ed3f62228494a966512791202cea7e3b57.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_81ffd4ed3f62228494a966512791202cea7e3b57.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_85fe3b9803254ea54b864d4865d7bd4d7a7f86c6.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_85fe3b9803254ea54b864d4865d7bd4d7a7f86c6.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_87f53d441e22c1d27c27eaa6003c83da1207c063.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_87f53d441e22c1d27c27eaa6003c83da1207c063.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_977cdf5d396522194d6b9e945169ff8073b4296b.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_977cdf5d396522194d6b9e945169ff8073b4296b.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9a209f3ee1b1f543ca2587b695d2eb0e63e74c51.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9a209f3ee1b1f543ca2587b695d2eb0e63e74c51.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9a5be90921256e90428c77753eca5ea0d31bd910.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9a5be90921256e90428c77753eca5ea0d31bd910.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9b03e9f7a1bc35e408b3a17ee90cfdadea164df6.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9b03e9f7a1bc35e408b3a17ee90cfdadea164df6.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9ceccab07fbf7130bffe3c201c710719e4a3e9af.err \
|
||||
@ -466,10 +498,6 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql.sh_9e1d05b821822ee40e13fadb24ec558f4bfcff10.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_a6b68b9f0044d18e7fa8f9287ddc9110701edc33.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_a6b68b9f0044d18e7fa8f9287ddc9110701edc33.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ac1f6e9a88608ef8939f9c2f7061a25a86742d46.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ac1f6e9a88608ef8939f9c2f7061a25a86742d46.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ade121f29bedea0d1a54452cc994b2302ad9dabb.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ade121f29bedea0d1a54452cc994b2302ad9dabb.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.err \
|
||||
@ -490,22 +518,10 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql.sh_c73dec2706fc0b9a124f5da3a83f40d8d3255beb.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_cc77a633a66d1778705a34e3657737547b3fb08d.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_cc77a633a66d1778705a34e3657737547b3fb08d.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_e036fabdc6c15f65a374b95c9922212670d494ee.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_e036fabdc6c15f65a374b95c9922212670d494ee.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_e70dc7d2b686c7f91c2b41b10f3920c50f3ea405.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_e70dc7d2b686c7f91c2b41b10f3920c50f3ea405.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ec4623bd63ff353f50db44da1231e46a1a4f1824.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_ec4623bd63ff353f50db44da1231e46a1a4f1824.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_f7476c76ea51cf479a6a79b037e0cb59871b629c.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_f7476c76ea51cf479a6a79b037e0cb59871b629c.out \
|
||||
$(srcdir)/%reldir%/test_sql.sh_f8340cb4c62aabd839ea09235b6ebe41b2bb48f4.err \
|
||||
$(srcdir)/%reldir%/test_sql.sh_f8340cb4c62aabd839ea09235b6ebe41b2bb48f4.out \
|
||||
$(srcdir)/%reldir%/test_sql_anno.sh_028d5d5af2f3519b59d349d41cb7ecf385253b51.err \
|
||||
$(srcdir)/%reldir%/test_sql_anno.sh_028d5d5af2f3519b59d349d41cb7ecf385253b51.out \
|
||||
$(srcdir)/%reldir%/test_sql_anno.sh_0a37c43350ddd7a2d0d75695be32fac083ad04a4.err \
|
||||
@ -628,8 +644,6 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_6f707b6e856dbaab6f95e7e89b98dc3652021f85.out \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.err \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.out \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_b85adec8abbf7d3882f5f9c509a5d3a5043a8c5e.err \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_b85adec8abbf7d3882f5f9c509a5d3a5043a8c5e.out \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.err \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.out \
|
||||
$(srcdir)/%reldir%/test_sql_indexes.sh_f7681c234d4f60df16c997a05163aeb058c52870.err \
|
||||
@ -852,6 +866,46 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql_time_func.sh_dbe786c096d5a7a5e1d05311b929f1427d8bac79.out \
|
||||
$(srcdir)/%reldir%/test_sql_time_func.sh_f3b1ea49779117bf45f85ad5615fdc5e89193db6.err \
|
||||
$(srcdir)/%reldir%/test_sql_time_func.sh_f3b1ea49779117bf45f85ad5615fdc5e89193db6.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_28e23f4e98b1acd6478e39844fd9306b444550c3.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_28e23f4e98b1acd6478e39844fd9306b444550c3.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_662b5f9b17aa69a8e3aa9a18acb30d9acf6e2837.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_662b5f9b17aa69a8e3aa9a18acb30d9acf6e2837.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_764ea85863d4f0ea3b7cb40850ac7c8fde682d57.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_764ea85863d4f0ea3b7cb40850ac7c8fde682d57.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_81ffd4ed3f62228494a966512791202cea7e3b57.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_81ffd4ed3f62228494a966512791202cea7e3b57.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_87f53d441e22c1d27c27eaa6003c83da1207c063.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_87f53d441e22c1d27c27eaa6003c83da1207c063.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_977cdf5d396522194d6b9e945169ff8073b4296b.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_977cdf5d396522194d6b9e945169ff8073b4296b.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_9a5be90921256e90428c77753eca5ea0d31bd910.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_9a5be90921256e90428c77753eca5ea0d31bd910.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ac1f6e9a88608ef8939f9c2f7061a25a86742d46.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ac1f6e9a88608ef8939f9c2f7061a25a86742d46.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ade121f29bedea0d1a54452cc994b2302ad9dabb.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ade121f29bedea0d1a54452cc994b2302ad9dabb.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_e036fabdc6c15f65a374b95c9922212670d494ee.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_e036fabdc6c15f65a374b95c9922212670d494ee.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ec4623bd63ff353f50db44da1231e46a1a4f1824.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ec4623bd63ff353f50db44da1231e46a1a4f1824.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_f7476c76ea51cf479a6a79b037e0cb59871b629c.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_f7476c76ea51cf479a6a79b037e0cb59871b629c.out \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_f8340cb4c62aabd839ea09235b6ebe41b2bb48f4.err \
|
||||
$(srcdir)/%reldir%/test_sql_views_vtab.sh_f8340cb4c62aabd839ea09235b6ebe41b2bb48f4.out \
|
||||
$(srcdir)/%reldir%/test_sql_xml_func.sh_46dfa23e2effabf3fa150c4b871fd8d22b1c834d.err \
|
||||
$(srcdir)/%reldir%/test_sql_xml_func.sh_46dfa23e2effabf3fa150c4b871fd8d22b1c834d.out \
|
||||
$(srcdir)/%reldir%/test_sql_xml_func.sh_4effabf11b59580e5f0727199eb74fba049c0cda.err \
|
||||
|
@ -1,6 +0,0 @@
|
||||
[1m[31m✘ error[0m: write-json-to -- unavailable in secure mode
|
||||
[36m --> [0m[1mcommand-option[0m:2
|
||||
[36m | [0m[37m[40m:[0m[1m[36m[40mwrite-json-to[0m[37m[40m - [0m
|
||||
[36m =[0m [36mhelp[0m: [4m:[0m[1m[4mwrite-json-to[0m[4m [0m[4mpath[0m
|
||||
══════════════════════════════════════════════════════════════════════
|
||||
Write SQL results to the given file in JSON format
|
@ -1,121 +0,0 @@
|
||||
[1m[31m✘ error[0m: “abc(def” is not a valid regular expression for property “[1m/invalid_props_log/search-table/bad_table_regex/pattern[0m”
|
||||
[1m[31mreason[0m: missing )
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-properties/format.json[0m:24
|
||||
[36m | [0m[37m[40m "pattern": "abc(def" [0m
|
||||
[36m --> [0m[1m/invalid_props_log/search-table/bad_table_regex/pattern[0m
|
||||
[36m | [0mabc[1m[7m[32m([0mdef
|
||||
[36m | [0m [1m[31m^ [0m[1m[31mmissing )[0m
|
||||
[36m =[0m [36mhelp[0m: [1mProperty Synopsis[0m
|
||||
[1m/invalid_props_log/search-table/bad_table_regex/pattern[0m [4m<regex>[0m
|
||||
[1mDescription[0m
|
||||
The regular expression for this search table.
|
||||
[1m[31m✘ error[0m: “^(?<timestamp>\d+: (?<body>.*)$” is not a valid regular expression for property “[1m/bad_regex_log/regex/std/pattern[0m”
|
||||
[1m[31mreason[0m: missing )
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-regex/format.json[0m:6
|
||||
[36m | [0m[37m[40m "pattern": "^(?<timestamp>\\d+: (?<body>.*)$"[0m
|
||||
[36m --> [0m[1m/bad_regex_log/regex/std/pattern[0m
|
||||
[36m | [0m[1m[36m^[0m[1m[7m[32m([0m[1m[32m?<[0mtimestamp>[1m\d[0m[1m[36m+[0m: [1m[32m([0m[1m[32m?<[0mbody>[1m[36m.[0m[1m[36m*[0m[1m[32m)[0m[1m[36m$[0m
|
||||
[36m | [0m [1m[31m^ [0m[1m[31mmissing )[0m
|
||||
[36m =[0m [36mhelp[0m: [1mProperty Synopsis[0m
|
||||
[1m/bad_regex_log/regex/std/pattern[0m [4m<message-regex>[0m
|
||||
[1mDescription[0m
|
||||
The regular expression to match a log message and capture fields.
|
||||
[1m[31m✘ error[0m: “(foo” is not a valid regular expression for property “[1m/bad_regex_log/level/error[0m”
|
||||
[1m[31mreason[0m: missing )
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-regex/format.json[0m:10
|
||||
[36m | [0m[37m[40m "error" : "(foo" [0m
|
||||
[36m --> [0m[1m/bad_regex_log/level/error[0m
|
||||
[36m | [0m[1m[7m[32m([0mfoo
|
||||
[36m | [0m [1m[31m^ [0m[1m[31mmissing )[0m
|
||||
[36m =[0m [36mhelp[0m: [1mProperty Synopsis[0m
|
||||
[1m/bad_regex_log/level/error[0m [4m<pattern|integer>[0m
|
||||
[1mDescription[0m
|
||||
The regular expression used to match the log text for this level. For JSON logs with numeric levels, this should be the number for the corresponding level.
|
||||
[1m[31m✘ error[0m: “abc(” is not a valid regular expression for property “[1m/bad_regex_log/highlights/foobar/pattern[0m”
|
||||
[1m[31mreason[0m: missing )
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-regex/format.json[0m:22
|
||||
[36m | [0m[37m[40m "pattern": "abc(" [0m
|
||||
[36m --> [0m[1m/bad_regex_log/highlights/foobar/pattern[0m
|
||||
[36m | [0mabc[1m[7m[32m([0m
|
||||
[36m | [0m [1m[31m^ [0m[1m[31mmissing )[0m
|
||||
[36m =[0m [36mhelp[0m: [1mProperty Synopsis[0m
|
||||
[1m/bad_regex_log/highlights/foobar/pattern[0m [4m<regex>[0m
|
||||
[1mDescription[0m
|
||||
A regular expression to highlight in logs of this format.
|
||||
[1m[31m✘ error[0m: “foo” is not a valid value for option “[1m/bad_sample_log/value/pid/kind[0m”
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sample/format.json[0m:24
|
||||
[36m | [0m[37m[40m "kind": "foo" [0m
|
||||
[36m =[0m [36mhelp[0m: [1mProperty Synopsis[0m
|
||||
[1m/bad_sample_log/value/pid/kind[0m [4m<data-type>[0m
|
||||
[1mDescription[0m
|
||||
The type of data in the field
|
||||
[1mAllowed Values[0m
|
||||
[1mstring[0m, [1minteger[0m, [1mfloat[0m, [1mboolean[0m, [1mjson[0m, [1mstruct[0m, [1mquoted[0m, [1mxml[0m
|
||||
[1m[31m✘ error[0m: '[1mbad[0m' is not a supported log format $schema version
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-schema/format.json[0m:2
|
||||
[36m | [0m[37m[40m "$schema": "bad" [0m
|
||||
[36m =[0m [36mnote[0m: expecting one of the following $schema values:
|
||||
[1m https://lnav.org/schemas/format-v1.schema.json[0m
|
||||
[36m =[0m [36mhelp[0m: [1mProperty Synopsis[0m
|
||||
[1m/$schema[0m [4mThe URI of the schema for this file[0m
|
||||
[1mDescription[0m
|
||||
Specifies the type of this file
|
||||
[1m[31m✘ error[0m: invalid sample log message: "abc: foo"
|
||||
[1m[31mreason[0m: unrecognized timestamp -- abc
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sample/format.json[0m:30
|
||||
[36m =[0m [36mnote[0m: the following custom formats were tried:
|
||||
abc
|
||||
[36m^ [0m“[1m%i[0m”[36m matched up to here[0m
|
||||
[36m =[0m [36mhelp[0m: If the timestamp format is not supported by default, you can add a custom format with the “[1mtimestamp-format[0m” property
|
||||
[1m[31m✘ error[0m: invalid sample log message: "1428634687123| debug hello"
|
||||
[1m[31mreason[0m: “[1mdebug[0m” does not match the expected level of “[1minfo[0m”
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sample/format.json[0m:33
|
||||
[1m[31m✘ error[0m: invalid pattern: “[1mwith-level[0m”
|
||||
[1m[31mreason[0m: pattern does not match entire multiline message
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sample/format.json[0m:37
|
||||
[36m =[0m [36mhelp[0m: using “.*” when capturing the body will match new-lines
|
||||
[1m[31m✘ error[0m: invalid sample log message: "1428634687123; foo bar"
|
||||
[1m[31mreason[0m: sample does not match any patterns
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sample/format.json[0m:41
|
||||
[36m =[0m [36mnote[0m: the following shows how each pattern matched this sample:
|
||||
1428634687123; foo bar
|
||||
[36m^ [0m[1mbad-time[0m[36m matched up to here[0m
|
||||
[36m^ [0m[1msemi[0m[36m matched up to here[0m
|
||||
[36m^ [0m[1mstd[0m[36m matched up to here[0m
|
||||
[36m^ [0m[1mwith-level[0m[36m matched up to here[0m
|
||||
[36m =[0m [36mnote[0m: [1mbad-time [0m = “^(?<timestamp>\w+): (?<body>\w+)$”
|
||||
[1msemi [0m = “^(?<timestamp>\d+); (?<body>\w+)$”
|
||||
[1mstd [0m = “^(?<timestamp>\d+): (?<pid>\w+) (?<body>.*)$”
|
||||
[1mwith-level[0m = “^(?<timestamp>\d+)\| (?<level>\w+) (?<body>\w+)$”
|
||||
|
||||
[1m[31m✘ error[0m: invalid value for property “[1m/invalid_props_log/timestamp-field[0m”
|
||||
[1m[31mreason[0m: “ts” was not found in the pattern at [1m/invalid_props_log/regex/std[0m
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-properties/format.json[0m:4
|
||||
[36m =[0m [36mnote[0m: the following captures are available:
|
||||
[1mbody[0m, [1mpid[0m, [1mtimestamp[0m
|
||||
[1m[31m✘ error[0m: “not a color” is not a valid color value for property “[1m/invalid_props_log/highlights/hl1/color[0m”
|
||||
[1m[31mreason[0m: Unknown color: 'not a color'. See https://jonasjacek.github.io/colors/ for a list of supported color names
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-properties/format.json[0m:18
|
||||
[1m[31m✘ error[0m: “also not a color” is not a valid color value for property “[1m/invalid_props_log/highlights/hl1/background-color[0m”
|
||||
[1m[31mreason[0m: Unknown color: 'also not a color'. See https://jonasjacek.github.io/colors/ for a list of supported color names
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-properties/format.json[0m:19
|
||||
[1m[31m✘ error[0m: “[1mno_regexes_log[0m” is not a valid log format
|
||||
[1m[31mreason[0m: no regexes specified
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/no-regexes/format.json[0m:4
|
||||
[1m[31m✘ error[0m: “[1mno_regexes_log[0m” is not a valid log format
|
||||
[1m[31mreason[0m: log message samples must be included in a format definition
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/no-regexes/format.json[0m:4
|
||||
[1m[31m✘ error[0m: “[1mno_sample_log[0m” is not a valid log format
|
||||
[1m[31mreason[0m: log message samples must be included in a format definition
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/no-samples/format.json[0m:4
|
||||
[1m[31m✘ error[0m: failed to compile SQL statement
|
||||
[1m[31mreason[0m: near "TALE": syntax error
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sql/init.sql[0m:4
|
||||
[36m | [0m[32m[40m-- comment test [0m
|
||||
[36m | [0m[1m[36m[40mCREATE[0m[37m[40m [0m[37m[40mTALE[0m[37m[40m [0m[1m[37m[40minvalid[0m[1m[37m[40m [0m[37m[40m([0m[37m[40mx[0m[37m[40m [0m[37m[40my[0m[37m[40m [0m[37m[40mz[0m[37m[40m); [0m
|
||||
[36m | [0m[37m[40m [0m[36m[40m^ [0m[1m[31m[40mnear "TALE": syntax error[0m[37m[40m [0m
|
||||
[1m[31m✘ error[0m: failed to execute SQL statement
|
||||
[1m[31mreason[0m: missing )
|
||||
[36m --> [0m[1m{test_dir}/bad-config/formats/invalid-sql/init2.sql[0m
|
||||
[36m | [0m[1m[36m[40mSELECT[0m[37m[40m [0m[1m[37m[40mregexp_match[0m[1m[7m[31m[40m([0m[35m[40m'abc('[0m[37m[40m, [0m[35m[40m'123'[0m[37m[40m) [0m
|
||||
[36m | [0m[1m[36m[40mFROM[0m[37m[40m [0m[37m[40msqlite_master[0m[37m[40m; [0m
|
@ -1,2 +1,2 @@
|
||||
[31m✘ error[0m: regex “[1mstd[0m” of format “[1msyslog_log[0m” has not been pushed to regex101.com
|
||||
[1m[31m✘ error[0m: regex “[1mstd[0m” of format “[1msyslog_log[0m” has not been pushed to regex101.com
|
||||
[36m =[0m [36mhelp[0m: use the “[1m[36mpush[0m” subcommand to create the regex on regex101.com for easy editing
|
||||
|
@ -1,3 +1,3 @@
|
||||
[31m✘ error[0m: unable to import: [1mhttps://regex101.com/r/zpEnjV/1[0m
|
||||
[31mreason[0m: format file already exists: [1mregex101-home/.lnav/formats/installed/unit_test_log.json[0m
|
||||
[1m[31m✘ error[0m: unable to import: [1mhttps://regex101.com/r/zpEnjV/1[0m
|
||||
[1m[31mreason[0m: format file already exists: [1mregex101-home/.lnav/formats/installed/unit_test_log.json[0m
|
||||
[36m =[0m [36mhelp[0m: delete the existing file to continue
|
||||
|
@ -1 +1 @@
|
||||
[31m✘ error[0m: expecting a regex101.com URL to import
|
||||
[1m[31m✘ error[0m: expecting a regex101.com URL to import
|
||||
|
@ -1,12 +1,12 @@
|
||||
[31m✘ error[0m: invalid sample log message: "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
|
||||
[31mreason[0m: sample does not match any patterns
|
||||
[1m[31m✘ error[0m: invalid sample log message: "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
|
||||
[1m[31mreason[0m: sample does not match any patterns
|
||||
[36m --> [0m[1mregex101-home/.lnav/formats/installed/unit_test_log.json[0m:26
|
||||
[36m =[0m [36mnote[0m: the following shows how each pattern matched this sample:
|
||||
[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {"ELAPSED":"0.011","LEVEL":"info","MESSAGE":"finished in 0.011\n","PREFIX":"YFgyWQriCmsAAofJAAAAHg","ROUTINGKEY":"EXAMPLE1366.Example.Events._Publish"}
|
||||
[36m =[0m [36mnote[0m: [1mstd[0m = “”
|
||||
|
||||
[31m✘ error[0m: invalid sample log message: "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
|
||||
[31mreason[0m: sample does not match any patterns
|
||||
[1m[31m✘ error[0m: invalid sample log message: "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
|
||||
[1m[31mreason[0m: sample does not match any patterns
|
||||
[36m --> [0m[1mregex101-home/.lnav/formats/installed/unit_test_log.json[0m:30
|
||||
[36m =[0m [36mnote[0m: the following shows how each pattern matched this sample:
|
||||
[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {"ELAPSED":"0.011","LEVEL":"info","MESSAGE":"finished in 0.011\n","PREFIX":"YFgyWQriCmsAAofJAAAAHg","ROUTINGKEY":"EXAMPLE1366.Example.Events._Publish"}
|
||||
|
@ -1,3 +1,3 @@
|
||||
[31m✘ error[0m: cannot delete regex101 entry while patch file exists
|
||||
[1m[31m✘ error[0m: cannot delete regex101 entry while patch file exists
|
||||
[36m =[0m [36mnote[0m: [1mregex101-home/.lnav/formats/installed/unit_test_log.regex101-zpEnjV.json[0m
|
||||
[36m =[0m [36mhelp[0m: move the contents of the patch file to the main log format and then delete the file to continue
|
||||
|
@ -1,2 +1,2 @@
|
||||
[31m✘ error[0m: invalid regex “[1mabc(def)[0m” from “[1mhttps://regex101.com/r/cvCJNP/1[0m”
|
||||
[31mreason[0m: only the “[1mpcre[0m” flavor of regexes are supported
|
||||
[1m[31m✘ error[0m: invalid regex “[1mabc(def)[0m” from “[1mhttps://regex101.com/r/cvCJNP/1[0m”
|
||||
[1m[31mreason[0m: only the “[1mpcre[0m” flavor of regexes are supported
|
||||
|
@ -1 +1 @@
|
||||
[31m✘ error[0m: unknown regex: [1mnon-existent[0m
|
||||
[1m[31m✘ error[0m: unknown regex: [1mnon-existent[0m
|
||||
|
@ -1,4 +1,4 @@
|
||||
[31m✘ error[0m: expecting an operation to perform on the [1mstd[0m regex using regex101.com
|
||||
[1m[31m✘ error[0m: expecting an operation to perform on the [1mstd[0m regex using regex101.com
|
||||
[36m =[0m [36mhelp[0m: the available subcommands are:
|
||||
• [1m[36mpush[0m: create/update an entry for this regex on regex101.com
|
||||
• [1m[36mpull[0m: create a patch format file for this regular expression based on the entry in regex101.com
|
||||
|
@ -1,3 +1,3 @@
|
||||
[31m✘ error[0m: unknown regex: [1ms[0m
|
||||
[1m[31m✘ error[0m: unknown regex: [1ms[0m
|
||||
[36m =[0m [36mnote[0m: did you mean one of the following?
|
||||
[1mstd[0m
|
||||
|
@ -1,3 +1,3 @@
|
||||
[31m✘ error[0m: expecting an operation to perform on the [1mstd[0m regular expression
|
||||
[1m[31m✘ error[0m: expecting an operation to perform on the [1mstd[0m regular expression
|
||||
[36m =[0m [36mhelp[0m: the available subcommands are:
|
||||
• [1m[36mregex101[0m: use regex101.com to edit this regular expression
|
||||
|
@ -1,4 +1,4 @@
|
||||
[31m✘ error[0m: unable to import: [1mabc[0m
|
||||
[31mreason[0m: expecting a format name that matches the regular expression “^\w+$”
|
||||
[1m[31m✘ error[0m: unable to import: [1mabc[0m
|
||||
[1m[31mreason[0m: expecting a format name that matches the regular expression “^\w+$”
|
||||
[36m =[0m [36mnote[0m: “def-jkl”
|
||||
[32m^ matched up to here[0m
|
||||
|
@ -1 +1 @@
|
||||
[31m✘ error[0m: no regex101 entry for [1msyslog_log[0m/[1mstd[0m
|
||||
[1m[31m✘ error[0m: no regex101 entry for [1msyslog_log[0m/[1mstd[0m
|
||||
|
@ -1,2 +1,2 @@
|
||||
[31m✘ error[0m: unable to get entry “[1mbadregex123[0m” on regex101.com
|
||||
[31mreason[0m: received response code [1m400[0m content “{"error":"Invalid permalink id",}”
|
||||
[1m[31m✘ error[0m: unable to get entry “[1mbadregex123[0m” on regex101.com
|
||||
[1m[31mreason[0m: received response code [1m400[0m content “{"error":"Invalid permalink id",}”
|
||||
|
@ -1 +1 @@
|
||||
[31m✘ error[0m: unknown format: [1mnon-existent[0m
|
||||
[1m[31m✘ error[0m: unknown format: [1mnon-existent[0m
|
||||
|
@ -1,4 +1,4 @@
|
||||
[31m✘ error[0m: expecting an operation to perform on the [1mstd[0m regex using regex101.com
|
||||
[1m[31m✘ error[0m: expecting an operation to perform on the [1mstd[0m regex using regex101.com
|
||||
[36m =[0m [36mnote[0m: this regex is currently associated with the following regex101.com entry:
|
||||
[1mhttps://regex101.com/r/zpEnjV[0m
|
||||
[36m =[0m [36mhelp[0m: the available subcommands are:
|
||||
|
@ -1 +1 @@
|
||||
[31m✘ error[0m: “[1mbro[0m” is an internal format that is not defined in a configuration file
|
||||
[1m[31m✘ error[0m: “[1mbro[0m” is an internal format that is not defined in a configuration file
|
||||
|
@ -1,5 +0,0 @@
|
||||
[1mlog_line [0m[1mlog_part [0m[1m log_time [0m[1m[7mlog_idle_msecs [0m[1mlog_level [0m[1mlog_mark [0m[1mlog_comment [0m[1mlog_tags [0m[1mlog_filters [0m[1mlog_msg_format [0m[1mlog_format [0m
|
||||
[1m[7m 8[0m[1m[7m [0m[1m[7m <[0m[1m[7mNULL[0m[1m[7m>[0m[1m[7m [0m[1m[7m2009-07-20 22:59:26.000[0m[1m[7m [0m[1m[7m 54047544000[0m[1m[7m [0m[1m[7minfo [0m[1m [0m[1m [0m[1m 0[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m [0m[1m [0m[1maccess_log [0m
|
||||
[7m [0m 9 <NULL> 2009-07-20 22:59:29.000 3000 error 0 <NULL> <NULL> <NULL> access_log
|
||||
[1m 10[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m2009-07-20 22:59:29.000[0m[1m [0m[1m 0[0m[1m [0m[1minfo [0m[1m [0m[1m 0[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m <[0m[1mNULL[0m[1m>[0m[1m [0m[1m [0m[1m [0m[1maccess_log [0m
|
||||
[7m 11[0m[7m [0m[7m <[0m[7mNULL[0m[7m>[0m[7m [0m[7m2013-02-15 06:00:31.000[0m[7m [0m[7m 112777262000[0m[7m [0m[7merror [0m[7m [0m[7m 0[0m[7m [0m[7m <[0m[7mNULL[0m[7m>[0m[7m [0m[7m <[0m[7mNULL[0m[7m>[0m[7m [0m[7m <[0m[7mNULL[0m[7m>[0m[7m [0m[7m [0m[7m [0m[7maccess_log[0m
|
@ -1,3 +0,0 @@
|
||||
Row 0:
|
||||
Column id: 1
|
||||
Column stack: {"1":10,"2":[1,2,3],"3":30.5}
|
@ -0,0 +1,4 @@
|
||||
[1m[31m✘ error[0m: SQL statement failed
|
||||
[1m[31mreason[0m: filter already exists -- :filter-in vmk
|
||||
[36m --> [0m[1mcommand-option[0m:3
|
||||
[36m | [0m[37m[40m;[0m[1m[36m[40mUPDATE[0m[37m[40m [0m[37m[40mlnav_view_filters[0m[37m[40m [0m[1m[36m[40mSET[0m[37m[40m [0m[37m[40mpattern[0m[37m[40m [0m[1m[37m[40m=[0m[37m[40m [0m[35m[40m'vmk'[0m
|
@ -0,0 +1,3 @@
|
||||
[1mview_name [0m[1m[7mfilter_id [0m[1m[7menabled [0m[1mtype [0m[1mlanguage [0m[1mpattern [0m
|
||||
[1m[7ml[0m[1m[7mo[0m[1mg [0m[1m [0m[1m 1[0m[1m [0m[1m 1[0m[1m [0m[1min [0m[1m [0m[1mregex [0m[1m [0m[1mvmk [0m
|
||||
[7mlog [0m[7m [0m[7m 2[0m[7m [0m[7m [0m[7m [0m 1 in regex vmk1
|
@ -0,0 +1,4 @@
|
||||
[1m[31m✘ error[0m: SQL statement failed
|
||||
[1m[31mreason[0m: A SQL expression filter already exists
|
||||
[36m --> [0m[1mcommand-option[0m:2
|
||||
[36m | [0m[37m[40m;[0m[1m[36m[40mINSERT[0m[37m[40m [0m[1m[36m[40mINTO[0m[37m[40m [0m[1m[37m[40mlnav_view_filters[0m[1m[37m[40m [0m[37m[40m([0m[37m[40mview_name[0m[37m[40m, [0m[37m[40mlanguage[0m[37m[40m, [0m[37m[40mpattern[0m[37m[40m) [0m[1m[36m[40mVALUES[0m[37m[40m ([0m[35m[40m'log'[0m[37m[40m, [0m[35m[40m'sql'[0m[37m[40m, [0m[35m[40m'1'[0m[37m[40m)[0m
|
@ -0,0 +1,2 @@
|
||||
[1mview_name [0m[1m[7mfilter_id [0m[1m[7menabled [0m[1mtype [0m[1mlanguage [0m[1mpattern [0m
|
||||
[1m[7mlog [0m[1m[7m [0m[1m[7m 0[0m[1m[7m [0m[1m[7m 1[0m[1m[7m [0m[1m[7mout [0m[1m[7m [0m[1m[7msql [0m[1m[7m [0m[1m[7m1 [0m[1m [0m
|
@ -0,0 +1,4 @@
|
||||
[1m[31m✘ error[0m: SQL statement failed
|
||||
[1m[31mreason[0m: filter already exists -- :filter-in vmk
|
||||
[36m --> [0m[1mcommand-option[0m:2
|
||||
[36m | [0m[37m[40m;[0m[1m[36m[40mINSERT[0m[37m[40m [0m[1m[36m[40mINTO[0m[37m[40m [0m[1m[37m[40mlnav_view_filters[0m[1m[37m[40m [0m[37m[40m([0m[37m[40mview_name[0m[37m[40m, [0m[37m[40mpattern[0m[37m[40m, [0m[37m[40mtype[0m[37m[40m) [0m[1m[36m[40mVALUES[0m[37m[40m ([0m[35m[40m'log'[0m[37m[40m, [0m[35m[40m'vmk'[0m[37m[40m, [0m[35m[40m'in'[0m[37m[40m)[0m
|
@ -0,0 +1,2 @@
|
||||
[1mview_name [0m[1m[7mfilter_id [0m[1m[7menabled [0m[1mtype [0m[1mlanguage [0m[1mpattern [0m
|
||||
[1m[7ml[0m[1m[7mo[0m[1mg [0m[1m [0m[1m 1[0m[1m [0m[1m 1[0m[1m [0m[1min [0m[1m [0m[1mregex [0m[1m [0m[1mvmk [0m
|
142
test/test_sql.sh
142
test/test_sql.sh
@ -264,93 +264,6 @@ Wed May 19 12:00:03 2021 line 3
|
||||
Wed May 19 12:00:04 UTC 2021 line 4
|
||||
EOF
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";SELECT view_name,basename(filepath),visible FROM lnav_view_files" \
|
||||
-c ":write-csv-to -" \
|
||||
${test_dir}/logfile_access_log.*
|
||||
|
||||
check_output "lnav_view_files does not work?" <<EOF
|
||||
view_name,basename(filepath),visible
|
||||
log,logfile_access_log.0,1
|
||||
log,logfile_access_log.1,1
|
||||
EOF
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_view_files SET visible=0 WHERE endswith(filepath, 'log.0')" \
|
||||
${test_dir}/logfile_access_log.*
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";DELETE FROM lnav_view_stack" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "deleting the view stack does not work?" <<EOF
|
||||
EOF
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_view_stack SET name = 'foo'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_stack VALUES ('help')" \
|
||||
-c ";DELETE FROM lnav_view_stack WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('log', 0, 1, 'out', 'regex', '')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('log', 0, 1, 'out', 'regex', 'abc(')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('bad', 0, 1, 'out', 'regex', 'abc')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES (NULL, 0, 1, 'out', 'regex', 'abc')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('log', 0 , 1, 'bad', 'regex', 'abc')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern) VALUES ('log', 'vmk')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern, type) VALUES ('log', 'vmk', 'in')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ":filter-out vmk" \
|
||||
-c ";DELETE FROM lnav_view_filters" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ":filter-out vmk" \
|
||||
-c ";UPDATE lnav_view_filters SET pattern = 'vmkboot'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ":filter-out vmk" \
|
||||
-c ";SELECT * FROM lnav_view_filter_stats" \
|
||||
-c ":write-csv-to -" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "view filter stats is not working?" <<EOF
|
||||
view_name,filter_id,hits
|
||||
log,1,2
|
||||
EOF
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, language, pattern) VALUES ('log', 'sql', ':sc_bytes = 134')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "inserted filter-out did not work?" <<EOF
|
||||
192.168.202.254 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
|
||||
EOF
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";SELECT * FROM access_log LIMIT 0" \
|
||||
@ -807,61 +720,6 @@ check_output "delete environ table does not work" <<EOF
|
||||
EOF
|
||||
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ';DELETE FROM lnav_views' \
|
||||
-c ';SELECT count(*) FROM lnav_views' \
|
||||
-c ':write-csv-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "delete from lnav_views table works?" <<EOF
|
||||
count(*)
|
||||
8
|
||||
EOF
|
||||
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_views (name) VALUES ('foo')" \
|
||||
-c ';SELECT count(*) FROM lnav_views' \
|
||||
-c ':write-csv-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "insert into lnav_views table works?" <<EOF
|
||||
count(*)
|
||||
8
|
||||
EOF
|
||||
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top = 1 WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top = inner_height - 1 WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "updating lnav_views.top using inner_height does not work?" <<EOF
|
||||
192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
|
||||
EOF
|
||||
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top_time = 'bad-time' WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top_time = '2014-10-08T00:00:00' WHERE name = 'log'" \
|
||||
${test_dir}/logfile_generic.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET search = 'warn' WHERE name = 'log'" \
|
||||
-c ";SELECT search FROM lnav_views WHERE name = 'log'" \
|
||||
${test_dir}/logfile_generic.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET search = 'warn' WHERE name = 'log'" \
|
||||
-c ":goto 0" \
|
||||
-c ":next-mark search" \
|
||||
${test_dir}/logfile_generic.0
|
||||
|
||||
schema_dump() {
|
||||
${lnav_test} -n -c ';.schema' ${test_dir}/logfile_access_log.0 | head -n19
|
||||
|
169
test/test_sql_views_vtab.sh
Normal file
169
test/test_sql_views_vtab.sh
Normal file
@ -0,0 +1,169 @@
|
||||
#! /bin/bash
|
||||
|
||||
export YES_COLOR=1
|
||||
unset XDG_CONFIG_HOME
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";SELECT view_name,basename(filepath),visible FROM lnav_view_files" \
|
||||
-c ":write-csv-to -" \
|
||||
${test_dir}/logfile_access_log.*
|
||||
|
||||
check_output "lnav_view_files does not work?" <<EOF
|
||||
view_name,basename(filepath),visible
|
||||
log,logfile_access_log.0,1
|
||||
log,logfile_access_log.1,1
|
||||
EOF
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_view_files SET visible=0 WHERE endswith(filepath, 'log.0')" \
|
||||
${test_dir}/logfile_access_log.*
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";DELETE FROM lnav_view_stack" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "deleting the view stack does not work?" <<EOF
|
||||
EOF
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_view_stack SET name = 'foo'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_stack VALUES ('help')" \
|
||||
-c ";DELETE FROM lnav_view_stack WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('log', 0, 1, 'out', 'regex', '')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('log', 0, 1, 'out', 'regex', 'abc(')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('bad', 0, 1, 'out', 'regex', 'abc')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES (NULL, 0, 1, 'out', 'regex', 'abc')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters VALUES ('log', 0 , 1, 'bad', 'regex', 'abc')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern) VALUES ('log', 'vmk')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern, type) VALUES ('log', 'vmk', 'in')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern, type) VALUES ('log', 'vmk', 'in')" \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern, type) VALUES ('log', 'vmk', 'in')" \
|
||||
-c ';SELECT * FROM lnav_view_filters' \
|
||||
-c ':write-screen-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern, type) VALUES ('log', 'vmk', 'in')" \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, pattern, type) VALUES ('log', 'vmk1', 'in')" \
|
||||
-c ";UPDATE lnav_view_filters SET pattern = 'vmk'" \
|
||||
-c ';SELECT * FROM lnav_view_filters' \
|
||||
-c ':write-screen-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, language, pattern) VALUES ('log', 'sql', '1')" \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, language, pattern) VALUES ('log', 'sql', '1')" \
|
||||
-c ';SELECT * FROM lnav_view_filters' \
|
||||
-c ':write-screen-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ":filter-out vmk" \
|
||||
-c ";DELETE FROM lnav_view_filters" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ":filter-out vmk" \
|
||||
-c ";UPDATE lnav_view_filters SET pattern = 'vmkboot'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ":filter-out vmk" \
|
||||
-c ";SELECT * FROM lnav_view_filter_stats" \
|
||||
-c ":write-csv-to -" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "view filter stats is not working?" <<EOF
|
||||
view_name,filter_id,hits
|
||||
log,1,2
|
||||
EOF
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_view_filters (view_name, language, pattern) VALUES ('log', 'sql', ':sc_bytes = 134')" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "inserted filter-out did not work?" <<EOF
|
||||
192.168.202.254 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
|
||||
EOF
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ';DELETE FROM lnav_views' \
|
||||
-c ';SELECT count(*) FROM lnav_views' \
|
||||
-c ':write-csv-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "delete from lnav_views table works?" <<EOF
|
||||
count(*)
|
||||
8
|
||||
EOF
|
||||
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";INSERT INTO lnav_views (name) VALUES ('foo')" \
|
||||
-c ';SELECT count(*) FROM lnav_views' \
|
||||
-c ':write-csv-to -' \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "insert into lnav_views table works?" <<EOF
|
||||
count(*)
|
||||
8
|
||||
EOF
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top = 1 WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top = inner_height - 1 WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
check_output "updating lnav_views.top using inner_height does not work?" <<EOF
|
||||
192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
|
||||
EOF
|
||||
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top_time = 'bad-time' WHERE name = 'log'" \
|
||||
${test_dir}/logfile_access_log.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET top_time = '2014-10-08T00:00:00' WHERE name = 'log'" \
|
||||
${test_dir}/logfile_generic.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET search = 'warn' WHERE name = 'log'" \
|
||||
-c ";SELECT search FROM lnav_views WHERE name = 'log'" \
|
||||
${test_dir}/logfile_generic.0
|
||||
|
||||
run_cap_test ${lnav_test} -n \
|
||||
-c ";UPDATE lnav_views SET search = 'warn' WHERE name = 'log'" \
|
||||
-c ":goto 0" \
|
||||
-c ":next-mark search" \
|
||||
${test_dir}/logfile_generic.0
|
Loading…
Reference in New Issue
Block a user