File tree Expand file tree Collapse file tree 2 files changed +164
-0
lines changed
jfiletreeprettyprinter-examples
src/test/java/io/github/computerdaddyguy/jfiletreeprettyprinter Expand file tree Collapse file tree 2 files changed +164
-0
lines changed Original file line number Diff line number Diff line change 1616 <artifactId >jfiletreeprettyprinter-core</artifactId >
1717 <version >${revision} </version >
1818 </dependency >
19+ <dependency >
20+ <groupId >org.jspecify</groupId >
21+ <artifactId >jspecify</artifactId >
22+ </dependency >
23+ <dependency >
24+ <groupId >org.junit.jupiter</groupId >
25+ <artifactId >junit-jupiter-engine</artifactId >
26+ <scope >test</scope >
27+ </dependency >
28+ <dependency >
29+ <groupId >org.assertj</groupId >
30+ <artifactId >assertj-core</artifactId >
31+ <scope >test</scope >
32+ </dependency >
1933 </dependencies >
2034
2135</project >
Original file line number Diff line number Diff line change 1+ package io .github .computerdaddyguy .jfiletreeprettyprinter ;
2+
3+ import static org .assertj .core .api .Assertions .assertThat ;
4+
5+ import io .github .computerdaddyguy .jfiletreeprettyprinter .options .PrettyPrintOptions ;
6+ import java .nio .file .Path ;
7+ import org .junit .jupiter .api .Test ;
8+ import org .junit .jupiter .api .io .TempDir ;
9+
10+ class EmojisTest {
11+
12+ @ TempDir
13+ private Path root ;
14+
15+ @ Test
16+ void emojis () {
17+
18+ var printer = FileTreePrettyPrinter .builder ()
19+ .customizeOptions (PrettyPrintOptions ::withDefaultEmojis )
20+ .build ();
21+
22+ var result = printer .prettyPrint ("src/main/resources/emojis" );
23+ var expected = """
24+ 📂 emojis/
25+ ├─ 📂 applications/
26+ │ ├─ 📂 executables/
27+ │ │ ├─ 📱 file.apk
28+ │ │ ├─ 🖥️ file.app
29+ │ │ ├─ ⚙️ file.bin
30+ │ │ ├─ ⚙️ file.exe
31+ │ │ ├─ 📦 file.msi
32+ │ │ └─ 📱 file2.ipa
33+ │ └─ 📂 libs/
34+ │ ├─ 🧩 file.dll
35+ │ ├─ 🧩 file.lib
36+ │ └─ 🧩 file.so
37+ ├─ 📂 archives/
38+ │ ├─ 📦 file.7z
39+ │ ├─ 📦 file.gz
40+ │ ├─ 💿 file.img
41+ │ ├─ 💿 file.iso
42+ │ ├─ 📦 file.rar
43+ │ ├─ 📦 file.tar
44+ │ └─ 📦 file.zip
45+ ├─ 📂 code/
46+ │ ├─ 🚫 .gitignore
47+ │ ├─ 🐳 Dockerfile
48+ │ ├─ 🤵 Jenkinsfile
49+ │ ├─ 📂 build_tools/
50+ │ │ ├─ 🛠️ build.gradle
51+ │ │ ├─ 🛠️ makefile
52+ │ │ ├─ 🛠️ package.json
53+ │ │ └─ 🛠️ pom.xml
54+ │ ├─ ⚙️ docker-compose.yml
55+ │ ├─ 📂 lang/
56+ │ │ ├─ 💠 file.c
57+ │ │ ├─ ☕ file.class
58+ │ │ ├─ 💠 file.cpp
59+ │ │ ├─ 💠 file.cs
60+ │ │ ├─ 🎨 file.css
61+ │ │ ├─ 🌐 file.htm
62+ │ │ ├─ 🌐 file.html
63+ │ │ ├─ 🌐 file.htmx
64+ │ │ ├─ 📦 file.jar
65+ │ │ ├─ ☕ file.java
66+ │ │ ├─ 🎨 file.less
67+ │ │ ├─ 🐘 file.php
68+ │ │ ├─ 🐍 file.py
69+ │ │ ├─ 🎨 file.scss
70+ │ │ ├─ 🗄️ file.sql
71+ │ │ └─ 🔷 file.ts
72+ │ └─ 📂 scripting/
73+ │ ├─ 📜 file.bash
74+ │ ├─ 📜 file.bat
75+ │ └─ 📜 file.sh
76+ ├─ 📂 data/
77+ │ ├─ ⚙️ file.cfg
78+ │ ├─ ⚙️ file.conf
79+ │ ├─ 📊 file.csv
80+ │ ├─ ⚙️ file.ini
81+ │ ├─ 📝 file.json
82+ │ ├─ 📊 file.ods
83+ │ ├─ ⚙️ file.properties
84+ │ ├─ 📊 file.xls
85+ │ ├─ 📊 file.xlsx
86+ │ ├─ 📝 file.xml
87+ │ ├─ 📝 file.yaml
88+ │ └─ 📝 file.yml
89+ ├─ 📂 doc/
90+ │ ├─ 📝 file.doc
91+ │ ├─ 📝 file.docx
92+ │ ├─ 📚 file.epub
93+ │ ├─ 📝 file.md
94+ │ ├─ 📝 file.odt
95+ │ ├─ 📕 file.pdf
96+ │ ├─ 📝 file.rtf
97+ │ └─ 📝 file.txt
98+ ├─ 📄 file.unknown_extension
99+ ├─ 📄 file_without_extension
100+ ├─ 📂 internet/
101+ │ ├─ 📂 github/
102+ │ │ ├─ 🆕 changelog
103+ │ │ ├─ 🆕 changelog.md
104+ │ │ ├─ 🤝 contributing
105+ │ │ ├─ 🤝 contributing.md
106+ │ │ ├─ ⚖️ license
107+ │ │ ├─ ⚖️ license.md
108+ │ │ ├─ 📘 readme
109+ │ │ ├─ 📘 readme.md
110+ │ │ ├─ 🗺️ roadmap
111+ │ │ ├─ 🗺️ roadmap.md
112+ │ │ ├─ 🛡️ security
113+ │ │ └─ 🛡️ security.md
114+ │ └─ 🤖 robots.txt
115+ ├─ 📂 media/
116+ │ ├─ 📂 audio/
117+ │ │ ├─ 🎵 file.aac
118+ │ │ ├─ 🎵 file.flac
119+ │ │ ├─ 🎹 file.midi
120+ │ │ ├─ 🎵 file.mp3
121+ │ │ ├─ 🎵 file.ogg
122+ │ │ └─ 🎵 file.wav
123+ │ ├─ 📂 images/
124+ │ │ ├─ 🖼️ file.bmp
125+ │ │ ├─ 🎞️ file.gif
126+ │ │ ├─ 🖼️ file.ico
127+ │ │ ├─ 🖼️ file.jpeg
128+ │ │ ├─ 🖼️ file.jpg
129+ │ │ ├─ 🖼️ file.png
130+ │ │ └─ ✒️ file.svg
131+ │ └─ 📂 video/
132+ │ ├─ 🎬 file.avi
133+ │ ├─ 🎬 file.mkv
134+ │ ├─ 🎬 file.mov
135+ │ ├─ 🎬 file.mp4
136+ │ ├─ 🎬 file.webm
137+ │ └─ 🎬 file.wmv
138+ └─ 📂 system/
139+ ├─ 💾 file.bak
140+ ├─ 🔐 file.crt
141+ ├─ 🔑 file.key
142+ ├─ 📜 file.log
143+ ├─ 🔐 file.pem
144+ ├─ 🔓 file.pub
145+ └─ 🗑️ file.tmp""" ;
146+
147+ assertThat (result ).isEqualTo (expected );
148+ }
149+
150+ }
You can’t perform that action at this time.
0 commit comments