Skip to content

Commit

Permalink
fixed space in city names
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiiiijiiiiang committed Nov 11, 2024
1 parent 24a71c0 commit eadcb21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions scripts/test-commandline-args.sh
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
# Test Normal run
echo "[!] Testing: Normal Run"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -n

# Test help
echo "[!] Testing: Help"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -h
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -h -n

# Test version
echo "[!] Testing: Version"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -v
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -v -n

# Test distroid
echo "[!] Testing: DistroId"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -d arch
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -d arch -n

# Test grep
echo "[!] Testing: Grep"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -g kernel
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -g kernel -n

# Test margin
echo "[!] Testing: Margin"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -m 1,2,3
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -m 1,2,3 -n

# Test layout
echo "[!] Testing: Layout"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -l ArtOnTop
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -l ArtOnTop -n

# Test figletlogos mode
echo "[!] Testing: FigletLogos"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -n

# Test figletlogos margin
echo "[!] Testing: FigletLogos Margin"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -fm 1,2,3
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -fm 1,2,3 -n

# Test figletlogos font with example figlet font file
echo "[!] Testing: FigletLogos Font"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -ff basic.flf
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -ff basic.flf -n

# Test default Config
echo "[!] Testing: Default config"
./../bin/catnap -c ../config/config.toml -a ../config/distros.toml
./../bin/catnap -c ../config/config.toml -a ../config/distros.toml -n

2 changes: 1 addition & 1 deletion src/catnaplib/platform/probe.nim
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ proc getWeather*(config: Config): string =
let cacheFile = "weather".toCachePath
var location = "";
if config.misc.contains("location"):
location = config.misc["location"].getStr()
location = config.misc["location"].getStr().replace(" ", "+")

result = readCache(cacheFile)
if result != "":
Expand Down

0 comments on commit eadcb21

Please sign in to comment.