Bash · 789 bytes Raw Blame History
1 #!/bin/bash
2 # Test ANSI color rendering similar to fortress
3
4 echo "Testing ANSI codes as fortress uses them:"
5 echo ""
6
7 # Test 1: Normal color + filename
8 printf '\033[34m\033[1mDirectory/\033[0m\n'
9 printf '\033[37mFile.txt\033[0m\n'
10 printf '\033[32mExecutable\033[0m\n'
11
12 echo ""
13 echo "Testing REVERSE (cursor highlight):"
14
15 # Test 2: Reverse video with color
16 printf '\033[7m\033[34m\033[1mDirectory/\033[0m\n'
17 printf '\033[7m\033[37mFile.txt\033[0m\n'
18
19 echo ""
20 echo "Testing sequence like fortress renders:"
21
22 # Test 3: Full sequence like display.f90 does
23 printf '\033[34m\033[1mdir1/\033[0m\n'
24 printf '\033[7m\033[34m\033[1mdir2/\033[0m <- This should be highlighted\n'
25 printf '\033[37mfile1.txt\033[0m\n'
26
27 echo ""
28 echo "If 'dir2/' above does NOT look different (reversed), that's the bug."