File tree 2 files changed +34
-13
lines changed
2 files changed +34
-13
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import sys
5
+ import pytest
6
+
7
+ from fontline .commands import get_linegap_percent_filepath
8
+
9
+ test_filepath_one = "test.ttf"
10
+ test_filepath_two = "./test.ttf"
11
+ test_filepath_three = "/dir1/dir2/test.ttf"
12
+ test_filepath_four = "~/dir1/dir2/test.ttf"
13
+ percent_value = "10"
14
+
15
+
16
+ def test_linegap_outfile_filepath_basename ():
17
+ response = get_linegap_percent_filepath (test_filepath_one , percent_value )
18
+ assert response == "test-linegap10.ttf"
19
+
20
+
21
+ def test_linegap_outfile_filepath_samedir_withdotsyntax ():
22
+ response = get_linegap_percent_filepath (test_filepath_two , percent_value )
23
+ assert response == "./test-linegap10.ttf"
24
+
25
+
26
+ def test_linegap_outfile_filepath_differentdir_fromroot ():
27
+ response = get_linegap_percent_filepath (test_filepath_three , percent_value )
28
+ assert response == "/dir1/dir2/test-linegap10.ttf"
29
+
30
+
31
+ def test_linegap_outfile_filepath_differentdir_fromuser ():
32
+ response = get_linegap_percent_filepath (test_filepath_four , percent_value )
33
+ assert response == "~/dir1/dir2/test-linegap10.ttf"
34
+
You can’t perform that action at this time.
0 commit comments