From b0cc4c5ec737b221afde555c7402d43ffcaf0f52 Mon Sep 17 00:00:00 2001 From: Nalin Bhardwaj Date: Wed, 25 Jan 2017 15:50:29 +0000 Subject: [PATCH] Added nanometers, fixed others --- share/goodie/conversions/ratios.yml | 60 ++++++++++++++--------------- t/Conversions.t | 12 ++++++ 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/share/goodie/conversions/ratios.yml b/share/goodie/conversions/ratios.yml index ceeacee3c07..533171dbee8 100644 --- a/share/goodie/conversions/ratios.yml +++ b/share/goodie/conversions/ratios.yml @@ -244,6 +244,34 @@ type: length unit: millimeter plural: millimeters --- +aliases: + - micrometre + - micrometres + - µm + - µms +factor: 1e06 +type: length +unit: micrometer +plural: micrometers +--- +aliases: + - nanometre + - nanometres +factor: 1e09 +type: length +unit: nanometer +plural: nanometers +--- +aliases: + - picometre + - picometres + - pm + - pms +factor: 1e12 +type: length +unit: picometer +plural: picometers +--- aliases: - thou - thous @@ -892,8 +920,6 @@ plural: leap years aliases: - pa - pas - - pascal - - pascals factor: 1 type: pressure unit: pascal @@ -902,8 +928,6 @@ plural: pascals aliases: - kpa - kpas - - kilopascal - - kilopascals factor: 0.001 type: pressure unit: kilopascal @@ -922,16 +946,12 @@ plural: megapascals aliases: - gpa - gpas - - gigapascal - - gigapascals factor: 1e-09 type: pressure unit: gigapascal plural: gigapascals --- -aliases: - - bar - - bars +aliases: [] factor: 1e-05 type: pressure unit: bar @@ -1645,24 +1665,4 @@ aliases: factor: 1.943844492440605 type: speed unit: knot -plural: knots ---- -aliases: - - micrometre - - micrometres - - µm - - µms -factor: 1e06 -type: length -unit: micrometer -plural: micrometers ---- -aliases: - - picometre - - picometres - - pm - - pms -factor: 1e12 -type: length -unit: picometer -plural: picometers \ No newline at end of file +plural: knots \ No newline at end of file diff --git a/t/Conversions.t b/t/Conversions.t index 72434153818..c62d9be1f9c 100755 --- a/t/Conversions.t +++ b/t/Conversions.t @@ -1152,6 +1152,18 @@ ddg_goodie_test( physical_quantity => 'length' }) ), + 'mm in inch' => test_zci( + '1 inch = 25.400 millimeters', + structured_answer => make_answer({ + markup_input => '1', + raw_input => '1', + from_unit => 'inch', + styled_output => '25.400', + raw_answer => '25.400', + to_unit => 'millimeters', + physical_quantity => 'length' + }) + ), 'how many fl oz in a cup' => test_zci ( '1 us cup = 8 us fluid ounces', structured_answer => make_answer({