@@ -208,5 +208,32 @@ public void GetAllWordsTest()
208
208
Assert . Equal ( 2048 , actual . Length ) ;
209
209
Assert . Equal ( "abandon" , actual [ 0 ] ) ;
210
210
}
211
+
212
+ // https://github.com/spesmilo/electrum/blob/63143307f1ed588f9ce0bca4adff71f6baca4277/electrum/tests/test_mnemonic.py#L153-L173
213
+ [ Theory ]
214
+ [ InlineData ( "cell dumb heartbeat north boom tease ship baby bright kingdom rare squeeze" , true ) ]
215
+ [ InlineData ( "cell dumb heartbeat north boom tease " , true ) ]
216
+ [ InlineData ( "cell dumb heartbeat north boom tease ship baby bright kingdom rare badword" , false ) ]
217
+ [ InlineData ( "cElL DuMb hEaRtBeAt nOrTh bOoM TeAsE ShIp bAbY BrIgHt kInGdOm rArE SqUeEzE" , true ) ]
218
+ [ InlineData ( " cElL DuMb hEaRtBeAt nOrTh bOoM TeAsE ShIp bAbY BrIgHt kInGdOm rArE SqUeEzE " , true ) ]
219
+ [ InlineData ( "hurry idiot prefer sunset mention mist jaw inhale impossible kingdom rare squeeze" , true ) ]
220
+ [ InlineData ( "cram swing cover prefer miss modify ritual silly deliver chunk behind inform able" , false ) ]
221
+ [ InlineData ( "cram swing cover prefer miss modify ritual silly deliver chunk behind inform" , false ) ]
222
+ [ InlineData ( "ostrich security deer aunt climb inner alpha arm mutual marble solid task" , false ) ]
223
+ [ InlineData ( "OSTRICH SECURITY DEER AUNT CLIMB INNER ALPHA ARM MUTUAL MARBLE SOLID TASK" , false ) ]
224
+ [ InlineData ( " oStRiCh sEcUrItY DeEr aUnT ClImB InNeR AlPhA ArM MuTuAl mArBlE SoLiD TaSk " , false ) ]
225
+ [ InlineData ( "x8" , false ) ]
226
+ [ InlineData ( "science dawn member doll dutch real can brick knife deny drive list" , false ) ]
227
+ [ InlineData ( "science dawn member doll dutch real ca brick knife deny drive list" , false ) ]
228
+ [ InlineData ( " sCience dawn member doll Dutch rEAl can brick knife deny drive lisT" , false ) ]
229
+ [ InlineData ( "frost pig brisk excite novel report camera enlist axis nation novel desert" , false ) ]
230
+ [ InlineData ( " fRoSt pig brisk excIte novel rePort CamEra enlist axis nation nOVeL dEsert " , false ) ]
231
+ [ InlineData ( "9dk" , false ) ]
232
+ [ InlineData ( "hardly point goal hallway patience key stone difference ready caught listen fact" , true ) ]
233
+ public void IsOldTest ( string m , bool expected )
234
+ {
235
+ bool actual = ElectrumMnemonic . IsOld ( m ) ;
236
+ Assert . Equal ( expected , actual ) ;
237
+ }
211
238
}
212
239
}
0 commit comments