diff --git a/test/history-test.c b/test/history-test.c index 5d37469d3..43d70cdc0 100644 --- a/test/history-test.c +++ b/test/history-test.c @@ -31,6 +31,7 @@ #include #include #include +#include #include static int test = 0; @@ -114,6 +115,17 @@ static void history_test ( void ) g_strfreev ( retv ); + // Pinning the last entry + config.pin_last = 1; + for ( unsigned int in = 0; in < 10; in++ ) { + history_set ( file, "popular" ); + } + history_set ( file, "last" ); + + retv = history_get_list ( file, &length ); + TASSERT ( g_strcmp0 ( retv[0], "last" ) == 0 ); + g_strfreev ( retv ); + unlink ( file ); }