alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users
MIT License
9.64k stars 842 forks source link

weather script tests #187

Closed virgilwashere closed 5 years ago

virgilwashere commented 5 years ago

Issue Label:

Description:

Weather tests passing specific location check.

"no arguments" doesn't show usage like the others, but runs wttr for "current location".

If its a bug make sure to include this section.

OS and OS version:

OS Version: TravisCI

virgilwashere commented 5 years ago

Alex can you confirm the output of weather with no arguments on a Mac?

My local Ubuntu system passes these tests....but I'm running bats v1.10 and TravisCI is 0.4.0.

Might be able to fix this with a TravisCI software update.

alexanderepstein commented 5 years ago

Unfortunately I don't have access to a Mac currently to test any of this on, I will look into updating Travis CI if that is the issue.

alexanderepstein commented 5 years ago

Rereading your comment though, based on the code if you use the weather with no arguments then it should grab the users location through ip address and display the weather. Every tool should have the same behavior on all platforms

navanchauhan commented 5 years ago

@virgilwashere output:

Weather report: Lat 28.67 and Lon 77.22

               Haze
  _ - _ - _ -  36 °C          
   _ - _ - _   → 19 km/h      
  _ - _ - _ -  5 km           
               0.0 mm         
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Sat 25 May ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       Partly cloudy  │    \  /       Partly cloudy  │    \  /       Partly cloudy  │    \  /       Partly cloudy  │
│  _ /"".-.     39 °C          │  _ /"".-.     40 °C          │  _ /"".-.     41 °C          │  _ /"".-.     38..39 °C      │
│    \_(   ).   ↘ 15-18 km/h   │    \_(   ).   ↘ 22-25 km/h   │    \_(   ).   → 21-24 km/h   │    \_(   ).   ↘ 15-17 km/h   │
│    /(___(__)  20 km          │    /(___(__)  20 km          │    /(___(__)  20 km          │    /(___(__)  20 km          │
│               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Sun 26 May ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│     \   /     Sunny          │     \   /     Sunny          │     \   /     Sunny          │     \   /     Clear          │
│      .-.      41..42 °C      │      .-.      43..45 °C      │      .-.      46..49 °C      │      .-.      45..47 °C      │
│   ― (   ) ―   → 8-9 km/h     │   ― (   ) ―   → 14-16 km/h   │   ― (   ) ―   ↘ 14-16 km/h   │   ― (   ) ―   ↘ 9-11 km/h    │
│      `-’      20 km          │      `-’      20 km          │      `-’      20 km          │      `-’      20 km          │
│     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Mon 27 May ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│     \   /     Sunny          │     \   /     Sunny          │    \  /       Partly cloudy  │     \   /     Clear          │
│      .-.      42..43 °C      │      .-.      45..48 °C      │  _ /"".-.     45..48 °C      │      .-.      43..45 °C      │
│   ― (   ) ―   → 17-20 km/h   │   ― (   ) ―   → 20-23 km/h   │    \_(   ).   ↘ 16-19 km/h   │   ― (   ) ―   ↑ 12-13 km/h   │
│      `-’      20 km          │      `-’      20 km          │    /(___(__)  20 km          │      `-’      20 km          │
│     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │               0.0 mm | 0%    │     /   \     0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘

Follow @igor_chubin for wttr.in updates
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

virgilwashere commented 5 years ago

I'll be back

Real soon.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has been inactive for 30 days.