From 1a27de19c590f803699cf082e416042d8b206c5f Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Wed, 18 Mar 2020 12:54:24 +0000
Subject: [PATCH] TEST: test firstDot option

---
 tests/test_fsl_utils_path.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/test_fsl_utils_path.py b/tests/test_fsl_utils_path.py
index f5e798377..d4cc1bec5 100644
--- a/tests/test_fsl_utils_path.py
+++ b/tests/test_fsl_utils_path.py
@@ -711,6 +711,16 @@ def test_splitExt():
         print(filename, '==', (outbase, outext))
         assert fslpath.splitExt(filename, allowed) == (outbase, outext)
 
+    # firstDot=True
+    tests = [
+        ('blah',               ('blah', '')),
+        ('blah.blah',          ('blah', '.blah')),
+        ('blah.one.two',       ('blah', '.one.two')),
+        ('blah.one.two.three', ('blah', '.one.two.three')),
+    ]
+
+    for f, exp in tests:
+        assert fslpath.splitExt(f, firstDot=True) == exp
 
 
 def test_getFileGroup_imageFiles_shouldPass():
-- 
GitLab