]> granicus.if.org Git - neomutt/commitdiff
test: templates for path functions
authorRichard Russon <rich@flatcap.org>
Thu, 18 Apr 2019 22:26:39 +0000 (23:26 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 24 Apr 2019 11:16:16 +0000 (12:16 +0100)
18 files changed:
.gitignore
test/Makefile.autosetup
test/path/main.c [new file with mode: 0644]
test/path/mutt_path_abbr_folder.c [new file with mode: 0644]
test/path/mutt_path_basename.c [new file with mode: 0644]
test/path/mutt_path_canon.c [new file with mode: 0644]
test/path/mutt_path_concat.c [new file with mode: 0644]
test/path/mutt_path_concatn.c [new file with mode: 0644]
test/path/mutt_path_dirname.c [new file with mode: 0644]
test/path/mutt_path_escape.c [new file with mode: 0644]
test/path/mutt_path_getcwd.c [new file with mode: 0644]
test/path/mutt_path_parent.c [new file with mode: 0644]
test/path/mutt_path_pretty.c [new file with mode: 0644]
test/path/mutt_path_realpath.c [new file with mode: 0644]
test/path/mutt_path_tidy.c [new file with mode: 0644]
test/path/mutt_path_tidy_dotdot.c [new file with mode: 0644]
test/path/mutt_path_tidy_slash.c [new file with mode: 0644]
test/path/mutt_path_to_absolute.c [new file with mode: 0644]

index 330609b16777279f53b4ff788aab4d1ea8d97677..bd974c33a346c67a9c188a4dc3471c790ec28ec8 100644 (file)
@@ -12,6 +12,7 @@ neomutt
 pgpewrap
 test/config-test
 test/neomutt-test
+test/path-test
 test/pattern-test
 test/string-test
 
index a77761d00741d27f8c9da5f661a47e05b322d17b..569970a4c86ebf6c95a308e9b933c2ebb54cb274 100644 (file)
@@ -17,6 +17,23 @@ CONFIG_OBJS  = test/config/main.o test/config/account.o \
                  test/config/regex.o test/config/set.o test/config/sort.o \
                  test/config/string.o test/config/synonym.o
 
+PATH_OBJS      = test/path/main.o \
+                 test/path/mutt_path_abbr_folder.o \
+                 test/path/mutt_path_basename.o \
+                 test/path/mutt_path_canon.o \
+                 test/path/mutt_path_concat.o \
+                 test/path/mutt_path_concatn.o \
+                 test/path/mutt_path_dirname.o \
+                 test/path/mutt_path_escape.o \
+                 test/path/mutt_path_getcwd.o \
+                 test/path/mutt_path_parent.o \
+                 test/path/mutt_path_pretty.o \
+                 test/path/mutt_path_realpath.o \
+                 test/path/mutt_path_tidy.o \
+                 test/path/mutt_path_tidy_dotdot.o \
+                 test/path/mutt_path_tidy_slash.o \
+                 test/path/mutt_path_to_absolute.o
+
 PATTERN_OBJS   = test/pattern/main.o \
                  test/pattern/comp.o \
                  test/pattern/dummy.o \
@@ -77,14 +94,17 @@ TEST_BINARY = test/neomutt-test$(EXEEXT)
 
 TEST_CONFIG = test/config-test$(EXEEXT)
 
+TEST_PATH = test/path-test$(EXEEXT)
+
 TEST_PATTERN = test/pattern-test$(EXEEXT)
 
 TEST_STRING = test/string-test$(EXEEXT)
 
 .PHONY: test
-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) $(TEST_STRING)
+test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
        $(TEST_BINARY)
        $(TEST_CONFIG)
+       $(TEST_PATH)
        $(TEST_PATTERN)
        $(TEST_STRING)
 
@@ -94,6 +114,9 @@ $(TEST_BINARY): $(TEST_OBJS) $(MUTTLIBS)
 $(TEST_CONFIG): $(PWD)/test/config $(CONFIG_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(CONFIG_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
+$(TEST_PATH): $(PWD)/test/path $(PATH_OBJS) $(MUTTLIBS)
+       $(CC) -o $@ $(PATH_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
 $(TEST_PATTERN): $(PWD)/test/pattern $(PATTERN_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(PATTERN_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
@@ -103,17 +126,21 @@ $(TEST_STRING): $(PWD)/test/string $(STRING_OBJS) $(MUTTLIBS)
 $(PWD)/test/config:
        $(MKDIR_P) $(PWD)/test/config
 
+$(PWD)/test/path:
+       $(MKDIR_P) $(PWD)/test/path
+
 $(PWD)/test/pattern:
        $(MKDIR_P) $(PWD)/test/pattern
 
 $(PWD)/test/string:
        $(MKDIR_P) $(PWD)/test/string
 
-all-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) $(TEST_STRING)
+all-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
 
 clean-test:
        $(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
              $(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \
+             $(TEST_PATH) $(PATH_OBJS) $(PATH_OBJS:.o=.Po) \
              $(TEST_PATTERN) $(PATTERN_OBJS) $(PATTERN_OBJS:.o=.Po) \
              $(TEST_STRING) $(STRING_OBJS) $(STRING_OBJS:.o=.Po)
 
@@ -126,6 +153,9 @@ TEST_DEPFILES = $(TEST_OBJS:.o=.Po)
 CONFIG_DEPFILES = $(CONFIG_OBJS:.o=.Po)
 -include $(CONFIG_DEPFILES)
 
+PATH_DEPFILES = $(PATH_OBJS:.o=.Po)
+-include $(PATH_DEPFILES)
+
 PATTERN_DEPFILES = $(PATTERN_OBJS:.o=.Po)
 -include $(PATTERN_DEPFILES)
 
diff --git a/test/path/main.c b/test/path/main.c
new file mode 100644 (file)
index 0000000..13e6b77
--- /dev/null
@@ -0,0 +1,57 @@
+/**
+ * @file
+ * Test code for Path Operations
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "acutest.h"
+
+/******************************************************************************
+ * Add your test cases to this list.
+ *****************************************************************************/
+#define NEOMUTT_TEST_LIST                                                      \
+  NEOMUTT_TEST_ITEM(test_mutt_path_abbr_folder)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_path_basename)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_path_canon)                                      \
+  NEOMUTT_TEST_ITEM(test_mutt_path_concat)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_path_concatn)                                    \
+  NEOMUTT_TEST_ITEM(test_mutt_path_dirname)                                    \
+  NEOMUTT_TEST_ITEM(test_mutt_path_escape)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_path_getcwd)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_path_parent)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_path_pretty)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_path_realpath)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_path_tidy)                                       \
+  NEOMUTT_TEST_ITEM(test_mutt_path_tidy_dotdot)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_path_tidy_slash)                                 \
+  NEOMUTT_TEST_ITEM(test_mutt_path_to_absolute)
+
+/******************************************************************************
+ * You probably don't need to touch what follows.
+ *****************************************************************************/
+#define NEOMUTT_TEST_ITEM(x) void x(void);
+NEOMUTT_TEST_LIST
+#undef NEOMUTT_TEST_ITEM
+
+TEST_LIST = {
+#define NEOMUTT_TEST_ITEM(x) { #x, x },
+  NEOMUTT_TEST_LIST
+#undef NEOMUTT_TEST_ITEM
+  { 0 }
+};
diff --git a/test/path/mutt_path_abbr_folder.c b/test/path/mutt_path_abbr_folder.c
new file mode 100644 (file)
index 0000000..758af4d
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_abbr_folder()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_abbr_folder(void)
+{
+  // bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder);
+}
diff --git a/test/path/mutt_path_basename.c b/test/path/mutt_path_basename.c
new file mode 100644 (file)
index 0000000..f8886cb
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_basename()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_basename(void)
+{
+  // const char *mutt_path_basename(const char *f);
+}
diff --git a/test/path/mutt_path_canon.c b/test/path/mutt_path_canon.c
new file mode 100644 (file)
index 0000000..89f2548
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_canon()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_canon(void)
+{
+  // bool mutt_path_canon(char *buf, size_t buflen, const char *homedir);
+}
diff --git a/test/path/mutt_path_concat.c b/test/path/mutt_path_concat.c
new file mode 100644 (file)
index 0000000..e5a74e6
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_concat()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_concat(void)
+{
+  // char *mutt_path_concat(char *d, const char *dir, const char *fname, size_t l);
+}
diff --git a/test/path/mutt_path_concatn.c b/test/path/mutt_path_concatn.c
new file mode 100644 (file)
index 0000000..e866a2f
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_concatn()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_concatn(void)
+{
+  // char *mutt_path_concatn(char *dst, size_t dstlen, const char *dir, size_t dirlen, const char *fname, size_t fnamelen);
+}
diff --git a/test/path/mutt_path_dirname.c b/test/path/mutt_path_dirname.c
new file mode 100644 (file)
index 0000000..0fae79e
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_dirname()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_dirname(void)
+{
+  // char *mutt_path_dirname(const char *path);
+}
diff --git a/test/path/mutt_path_escape.c b/test/path/mutt_path_escape.c
new file mode 100644 (file)
index 0000000..99874d4
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_escape()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_escape(void)
+{
+  // char *mutt_path_escape(const char *src);
+}
diff --git a/test/path/mutt_path_getcwd.c b/test/path/mutt_path_getcwd.c
new file mode 100644 (file)
index 0000000..3e9ac5d
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_getcwd()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_getcwd(void)
+{
+  // void mutt_path_getcwd(struct Buffer *cwd);
+}
diff --git a/test/path/mutt_path_parent.c b/test/path/mutt_path_parent.c
new file mode 100644 (file)
index 0000000..0a0468f
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_parent()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_parent(void)
+{
+  // bool mutt_path_parent(char *buf, size_t buflen);
+}
diff --git a/test/path/mutt_path_pretty.c b/test/path/mutt_path_pretty.c
new file mode 100644 (file)
index 0000000..8b2f817
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_pretty()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_pretty(void)
+{
+  // bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir);
+}
diff --git a/test/path/mutt_path_realpath.c b/test/path/mutt_path_realpath.c
new file mode 100644 (file)
index 0000000..165d8c3
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_realpath()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_realpath(void)
+{
+  // size_t mutt_path_realpath(char *buf);
+}
diff --git a/test/path/mutt_path_tidy.c b/test/path/mutt_path_tidy.c
new file mode 100644 (file)
index 0000000..562a936
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_tidy()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_tidy(void)
+{
+  // bool mutt_path_tidy(char *buf);
+}
diff --git a/test/path/mutt_path_tidy_dotdot.c b/test/path/mutt_path_tidy_dotdot.c
new file mode 100644 (file)
index 0000000..de0822f
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_tidy_dotdot()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_tidy_dotdot(void)
+{
+  // bool mutt_path_tidy_dotdot(char *buf);
+}
diff --git a/test/path/mutt_path_tidy_slash.c b/test/path/mutt_path_tidy_slash.c
new file mode 100644 (file)
index 0000000..3ace0e8
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_tidy_slash()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_tidy_slash(void)
+{
+  // bool mutt_path_tidy_slash(char *buf);
+}
diff --git a/test/path/mutt_path_to_absolute.c b/test/path/mutt_path_to_absolute.c
new file mode 100644 (file)
index 0000000..06d38a9
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_path_to_absolute()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_path_to_absolute(void)
+{
+  // int mutt_path_to_absolute(char *path, const char *reference);
+}