Skip to content

Commit

Permalink
Move os test spec into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Nov 26, 2024
1 parent c37f386 commit 20e195d
Show file tree
Hide file tree
Showing 81 changed files with 1,471 additions and 1,322 deletions.
1 change: 1 addition & 0 deletions src/enums/ua-parser-enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ const OS = Object.freeze({
IOS: 'iOS',
JOLI: 'Joli',
KAIOS: 'KaiOS',
KUBUNTU: 'Kubuntu',
LINPUS: 'Linpus',
LINSPIRE: 'Linspire',
LINUX: 'Linux',
Expand Down
11 changes: 11 additions & 0 deletions test/specs/os/aix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "AIX",
"ua" : "Mozilla/5.0 (X11; U; AIX 000138384C00; en-US; rv:1.0.1) Gecko/20030213 Netscape/7.0",
"expect" :
{
"name" : "AIX",
"version" : "undefined"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/amigaos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "AmigaOS",
"ua" : "Mozilla/4.0 (compatible; AWEB 3.4 SE; AmigaOS)",
"expect" :
{
"name" : "AmigaOS",
"version" : "undefined"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/android-x86.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Android-x86",
"ua" : "Mozilla/5.0 (Linux; Android 7.1.2; Generic Android-x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 OPR/61.2.3076.56749",
"expect" :
{
"name" : "Android-x86",
"version" : "7.1.2"
}
}
]
20 changes: 20 additions & 0 deletions test/specs/os/android.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"desc" : "Android",
"ua" : "Mozilla/5.0 (Linux; U; Android 2.2.2; en-us; VM670 Build/FRG83G) AppleWebKit/533.1 (KHTML, like Gecko)",
"expect" :
{
"name" : "Android",
"version" : "2.2.2"
}
},
{
"desc" : "KTB-Nexus 5",
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)",
"expect" :
{
"name" : "Android",
"version" : "4.2.1"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/arch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Arch",
"ua" : "Uzbl (Webkit 1.1.10) (Arch Linux)",
"expect" :
{
"name" : "Arch",
"version" : "undefined"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/bada.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Bada",
"ua" : "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S5253/S5253DDKC1; U; Bada/1.0; en-us) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WQVGA SMM-MMS/1.2.0 OPN-B",
"expect" :
{
"name" : "Bada",
"version" : "1.0"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/beos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "BeOS",
"ua" : "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.8.1.8pre) Gecko/20070926 SeaMonkey/1.1.5pre",
"expect" :
{
"name" : "BeOS",
"version" : "undefined"
}
}
]
20 changes: 20 additions & 0 deletions test/specs/os/blackberry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"desc" : "BlackBerry",
"ua" : "BlackBerry9300/5.0.0.912 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/378",
"expect" :
{
"name" : "BlackBerry",
"version" : "5.0.0.912"
}
},
{
"desc" : "BlackBerry 10",
"ua" : "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.3+ (KHTML, like Gecko) Version/10.0.9.386 Mobile Safari/537.3+",
"expect" :
{
"name" : "BlackBerry",
"version" : "10"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/centos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "CentOS",
"ua" : "Konqueror/15.13 (CentOS Linux 7.4; cs-CZ;)",
"expect" :
{
"name" : "CentOS",
"version" : "7.4"
}
}
]
20 changes: 20 additions & 0 deletions test/specs/os/chrome-os.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"desc" : "Chrome OS",
"ua" : "Mozilla/5.0 (X11; CrOS x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.0.0 Safari/537.36",
"expect" :
{
"name" : "Chrome OS",
"version" : "undefined"
}
},
{
"desc" : "Chromium OS",
"ua" : "Mozilla/5.0 (X11; CrOS x86_64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"expect" :
{
"name" : "Chrome OS",
"version" : "10575.58.0"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/chromecast-android.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Google Chromecast with Google TV",
"ua" : "Mozilla/5.0 (Linux; Android 12.0; Build/STTL.240206.002) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.0 Safari/537.36 CrKey/1.56.500000 DeviceType/AndroidTV",
"expect" :
{
"name" : "Chromecast Android",
"version" : "12.0"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/chromecast-fuchsia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Google Chromecast Nest Hub",
"ua" : "Mozilla/5.0 (Fuchsia) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 CrKey/1.56.500000",
"expect" :
{
"name" : "Chromecast Fuchsia",
"version" : "1.56.500000"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/chromecast-linux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Google Chromecast Legacy Linux-Based",
"ua" : "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.81 Safari/537.36 CrKey/1.42.183786",
"expect" :
{
"name" : "Chromecast Linux",
"version" : "1.42.183786"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/chromecast-smartspeaker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Google Chromecast Mini Smart Speaker",
"ua" : "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.225 Safari/537.36 CrKey/1.56.500000 DeviceType/SmartSpeaker",
"expect" :
{
"name" : "Chromecast SmartSpeaker",
"version" : "1.56.500000"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/contiki.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Contiki",
"ua" : "Contiki/1.0 (Commodore 64; http://dunkels.com/adam/contiki/)",
"expect" :
{
"name" : "Contiki",
"version" : "1.0"
}
}
]
56 changes: 56 additions & 0 deletions test/specs/os/debian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) (Debian)",
"expect" :
{
"name" : "Debian",
"version" : "undefined"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Debian GNU/Linux 8.1 (jessie)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.0 Maxthon/1.0.5.3 Safari/537.36",
"expect" :
{
"name" : "Debian",
"version" : "8.1"
}
},
{
"desc" : "Debian",
"ua" : "ELinks/0.12~pre5-4 (textmode; Debian; Linux 3.2.0-4-amd64 x86_64 192x47-2)",
"expect" :
{
"name" : "Debian",
"version" : "undefined"
}
},
{
"desc" : "Debian",
"ua" : "w3m/0.5.3+debian-19",
"expect" :
{
"name" : "debian",
"version" : "19"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 (Debian-3.0.1-1)",
"expect" :
{
"name" : "Debian",
"version" : "3.0.1-1"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux 2.6.24.4; X11) KHTML/3.5.9 (like Gecko) (Debian package 4:3.5.9.dfsg.1-2+b1)",
"expect" :
{
"name" : "Debian",
"version" : "undefined"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/deepin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "Deepin",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Deepin 15.5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36 NFSBrowser/5.0.0.1886",
"expect" :
{
"name" : "Deepin",
"version" : "15.5"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/dragonfly.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "DragonFly",
"ua" : "Mozilla/5.0 (X11; U; DragonFly i386; de; rv:1.9.1) Gecko/20090720 Firefox/3.5.1",
"expect" :
{
"name" : "DragonFly",
"version" : "undefined"
}
}
]
11 changes: 11 additions & 0 deletions test/specs/os/elementary-os.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"desc" : "elementary OS",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/604.1 (KHTML, like Gecko) Version/11.0 Safari/604.1 elementary OS/0.4 (Loki) Epiphany/3.18.11",
"expect" :
{
"name" : "elementary OS",
"version" : "0.4"
}
}
]
29 changes: 29 additions & 0 deletions test/specs/os/fedora.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"desc" : "Fedora",
"ua" : "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0",
"expect" :
{
"name" : "Fedora",
"version" : "undefined"
}
},
{
"desc" : "Fedora",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:2.0) Gecko/20110404 Fedora/16-dev Firefox/4.0",
"expect" :
{
"name" : "Fedora",
"version" : "16-dev"
}
},
{
"desc" : "Fedora",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; sk; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc10 Firefox/3.0.4",
"expect" :
{
"name" : "Fedora",
"version" : "3.0.4-1.fc10"
}
}
]
29 changes: 29 additions & 0 deletions test/specs/os/firefox-os.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"desc" : "Firefox OS",
"ua" : "Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0",
"expect" :
{
"name" : "Firefox OS",
"version" : "14.0"
}
},
{
"desc" : "Firefox OS on Tablet",
"ua" : "Mozilla/5.0 (Tablet; rv:26.0) Gecko/26.0 Firefox/26.0",
"expect" :
{
"name" : "Firefox OS",
"version" : "26.0"
}
},
{
"desc" : "Firefox OS on TV",
"ua" : "Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0",
"expect" :
{
"name" : "Firefox OS",
"version" : "44.0"
}
}
]
Loading

0 comments on commit 20e195d

Please sign in to comment.