From 2477fe2de044255ecdb38d962d73a036731f34fb Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Tue, 2 Apr 2019 08:53:44 +0200
Subject: [PATCH] Add simple test on filename extension to decide its treatment

This is a temporary construction to allow language tests while still checking
that nothing is broken (i.e. w/o language)
---
 src/main.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index fb89bd524..5f9949819 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -27,11 +27,17 @@
 
 #include <limits>
 #include <map>
+#include <regex>
 
 int main(int argc, char *argv[])
 {
   std::string filename = initialize(argc, argv);
-  parser(filename);
+
+   std::regex gmsh_regex("(.*).msh");
+   if (not std::regex_match(filename, gmsh_regex))  {
+      parser(filename);
+      return 0;
+   }
 
   std::map<std::string, double> method_cost_map;
 
-- 
GitLab