Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ tests/lib/vfs/mc.charsets
tests/lib/widget/Makefile
tests/src/Makefile
tests/src/filemanager/Makefile
tests/src/viewer/Makefile
tests/src/editor/Makefile
tests/src/editor/edit_complete_word_cmd_test_data.txt
tests/src/vfs/Makefile
Expand Down
2 changes: 1 addition & 1 deletion lib/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ list_append_unique (GList *list, char *text)
* If there is no stored data, return line 1 and col 0.
*/

void
MC_MOCKABLE void
load_file_position (const vfs_path_t *filename_vpath, long *line, long *column, off_t *offset,
GArray **bookmarks)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/wtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ create_message (int flags, const char *title, const char *text, ...)
/* --------------------------------------------------------------------------------------------- */
/** Show message box, background safe */

void
MC_MOCKABLE void
message (int flags, const char *title, const char *text, ...)
{
char *p;
Expand Down
2 changes: 1 addition & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ check_for_default (const vfs_path_t *default_file_vpath, const vfs_path_t *file_
* @param file file name. Can be NULL.
*/

void
MC_MOCKABLE void
file_error_message (const char *format, const char *filename)
{
const char *error_string = unix_error_string (errno);
Expand Down
6 changes: 3 additions & 3 deletions src/viewer/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ mcview_update (WView *view)
/* --------------------------------------------------------------------------------------------- */
/** Displays as much data from view->dpy_start as fits on the screen */

void
MC_MOCKABLE void
mcview_display (WView *view)
{
if (view->mode_flags.hex)
Expand All @@ -246,7 +246,7 @@ mcview_display (WView *view)

/* --------------------------------------------------------------------------------------------- */

void
MC_MOCKABLE void
mcview_compute_areas (WView *view)
{
WRect view_area;
Expand Down Expand Up @@ -302,7 +302,7 @@ mcview_compute_areas (WView *view)

/* --------------------------------------------------------------------------------------------- */

void
MC_MOCKABLE void
mcview_update_bytes_per_line (WView *view)
{
int cols = view->data_area.cols;
Expand Down
4 changes: 2 additions & 2 deletions src/viewer/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ mcview_done (WView *view)

/* --------------------------------------------------------------------------------------------- */

void
MC_MOCKABLE void
mcview_set_codeset (WView *view)
{
const char *cp_id = NULL;
Expand Down Expand Up @@ -290,7 +290,7 @@ mcview_select_encoding (WView *view)

/* --------------------------------------------------------------------------------------------- */

void
MC_MOCKABLE void
mcview_show_error (WView *view, const char *format, const char *filename)
{
if (mcview_is_in_panel (view))
Expand Down
3 changes: 1 addition & 2 deletions src/viewer/mcviewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,7 @@ mcview_load (WView *view, const char *command, const char *file, int start_line,

if (fd1 == -1)
{
mcview_close_datasource (view);
mcview_show_error (view, _ ("Cannot open\n%s\nin parse mode\n%s"), file);
// VFS decompression failed -- display raw file content
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PACKAGE_STRING = "/src"

SUBDIRS = . filemanager vfs
SUBDIRS = . filemanager vfs viewer

if USE_INTERNAL_EDIT
SUBDIRS += editor
Expand Down
24 changes: 24 additions & 0 deletions tests/src/viewer/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PACKAGE_STRING = "/src/viewer"

AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/lib/vfs \
-DTEST_SHARE_DIR=\"$(abs_srcdir)/../fixtures\" \
@CHECK_CFLAGS@

LIBS = @CHECK_LIBS@ \
$(top_builddir)/src/libinternal.la \
$(top_builddir)/lib/libmc.la

if ENABLE_MCLIB
LIBS += $(GLIB_LIBS)
endif

TESTS = \
mcview__load_zip_magic

check_PROGRAMS = $(TESTS)

mcview__load_zip_magic_SOURCES = \
mcview__load_zip_magic.c
Loading