Skip to content

Commit

Permalink
test(arduino-cli): add special characters into unit test for optionPa…
Browse files Browse the repository at this point in the history
…rser
  • Loading branch information
brusherru committed Oct 18, 2018
1 parent 12873d3 commit 448845e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#### JUST A PART OF BOARDS.TXT FILE FROM ESP8266 PACKAGE
#### SOME OPTIONS WAS REMOVED TO MINIFY FIXTURE
#### A PART OF BOARDS.TXT FILE FROM ESP8266 PACKAGE
#### WITH SOME CHANGES: MENU AND OPTION NAMES
#### NOW CONTAINS SPECIAL CHARACTERS AND CYRILLIC SYMBOLS
#### TO MAKE SURE IN THE UNIT TESTS IT WILL WORK FINE
#### WITH ANY PACKAGE.
####
#### ONLY FOR TESTS!

#
# Do not create pull-requests for this file only, CI will not accept them.
# You *must* edit/modify/run boards.txt.py to regenerate boards.txt.
# All modified files after running with option "--allgen" must be included in the pull-request.
#

menu.UploadSpeed=Upload Speed
menu.CpuFrequency=CPU Frequency
menu.UploadSpeed=Uplo@d Speed (Скорость загрузки)
menu.CpuFrequency=CPU Frequency 123,-_[]():@we$ome

##############################################################
generic.name=Generic ESP8266 Module
Expand All @@ -26,7 +24,7 @@ generic.build.variant=generic
generic.build.spiffs_pagesize=256
generic.build.debug_port=
generic.build.debug_level=
generic.menu.CpuFrequency.80=80 MHz
generic.menu.CpuFrequency.80=80 MHz (!@#$$%^&*()[]_-+,./)
generic.menu.CpuFrequency.80.build.f_cpu=80000000L
generic.menu.CpuFrequency.160=160 MHz
generic.menu.CpuFrequency.160.build.f_cpu=160000000L
Expand Down Expand Up @@ -64,7 +62,7 @@ wifi_slot.build.core=esp8266
wifi_slot.build.spiffs_pagesize=256
wifi_slot.build.debug_port=
wifi_slot.build.debug_level=
wifi_slot.menu.CpuFrequency.80=80 MHz
wifi_slot.menu.CpuFrequency.80=80 MHz (!@#$$%^&*()[]_-+,./)
wifi_slot.menu.CpuFrequency.80.build.f_cpu=80000000L
wifi_slot.menu.CpuFrequency.160=160 MHz
wifi_slot.menu.CpuFrequency.160.build.f_cpu=160000000L
Expand Down
12 changes: 6 additions & 6 deletions packages/arduino-cli/test/optionParser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const fixtureDir = path.resolve(__dirname, 'fixtures');
// =============================================================================

const espOptionNames = {
UploadSpeed: 'Upload Speed',
CpuFrequency: 'CPU Frequency',
UploadSpeed: 'Uplo@d Speed (Скорость загрузки)',
CpuFrequency: 'CPU Frequency 123,-_[]():@we$ome',
};

const espOptions = {
Expand All @@ -47,7 +47,7 @@ const espOptions = {
],
CpuFrequency: [
{
name: '80 MHz',
name: '80 MHz (!@#$$%^&*()[]_-+,./)',
value: '80',
},
{
Expand All @@ -58,7 +58,7 @@ const espOptions = {
};

const uploadSpeedOptions = {
optionName: 'Upload Speed',
optionName: 'Uplo@d Speed (Скорость загрузки)',
optionId: 'UploadSpeed',
values: [
{
Expand All @@ -80,11 +80,11 @@ const uploadSpeedOptions = {
],
};
const cpuFrequencyOptions = {
optionName: 'CPU Frequency',
optionName: 'CPU Frequency 123,-_[]():@we$ome',
optionId: 'CpuFrequency',
values: [
{
name: '80 MHz',
name: '80 MHz (!@#$$%^&*()[]_-+,./)',
value: '80',
},
{
Expand Down

0 comments on commit 448845e

Please sign in to comment.