<commit_before>//process.env.DEBUG = true;
var bone = require('bonescript').bone;

var expectedResults = [];

expectedResults.push({
    "name": "LEDs",
    "search": /^USR/,
    "keys": ["USR0", "USR1", "USR2", "USR3"]
});

var pbKeys = [];
for(var i=1; i<=36; i++) {
    pbKeys.push("P1_" + i);
    pbKeys.push("P2_" + i);
}
expectedResults.push({
    "name": "PocketBeagleHeaders",
    "search": /^P[12]/,
    "keys": pbKeys
});

var boneKeys = [];
for(var i=1; i<=46; i++) {
    boneKeys.push("P8_" + i);
    boneKeys.push("P9_" + i);
}
boneKeys.push("P9_15B");
boneKeys.push("P9_41B");
boneKeys.push("P9_42B");
expectedResults.push({
    "name": "BeagleBoneHeaders",
    "search": /^P[89]/,
    "keys": boneKeys
});

var ainKeys = [];
for(var i=0; i<=7; i++) {
    ainKeys.push("A" + i);
}
expectedResults.push({
    "name": "AnalogInPins",
    "search": /^A[0-7]/,
    "keys": ainKeys
});

var gpioKeys = [];
for(var i=0; i<=117; i++) {
    gpioKeys.push("GPIO_" + i);
}
expectedResults.push({
    "name": "GPIOPins",
    "search": /^GPIO_/,
    "keys": gpioKeys
});
// removes must be done high-to-low to keep indexes valid
gpioKeys.splice(108,1); // remove GPIO3_12
gpioKeys.splice(107,1); // remove GPIO3_11
gpioKeys.splice(25,1); // remove GPIO0_25
gpioKeys.splice(24,1); // remove GPIO0_24

var eepromKeys = [];
for(var i=0; i<74; i++) {
    eepromKeys.push("EEPROM_" + i);
}
expectedResults.push({
    "name": "EEPROM",
    "search": /^EEPROM_/,
    "keys": eepromKeys
});

var blueKeys = [];
for(var i=1; i<=6; i++) {
    blueKeys.push("GP0_" + i);
    blueKeys.push("GP1_" + i);
    blueKeys.push("S1_1_" + i);
    blueKeys.push("S1_2_" + i);
    blueKeys.push("ADC_" + i);
}
for(var i=2; i<=6; i++) {
    blueKeys.push("GPS_" + i);
}
for(var i=1; i<=4; i++) {
    for(var j=1; j<=4; j++) {
        blueKeys.push("E" + j + "_" + i);
    }
    blueKeys.push("I2C_" + i);
    blueKeys.push("UT0_" + i);
    blueKeys.push("UT1_" + i);
    blueKeys.push("UT5_" + i);
}
for(var i=1; i<=3; i++) {
    blueKeys.push("DSM2_" + i);
}
blueKeys.push("RED");
blueKeys.push("GREEN");
blueKeys.push("BAT25");
blueKeys.push("BAT50");
blueKeys.push("BAT75");
blueKeys.push("BAT100");
blueKeys.push("PAUSE");
blueKeys.push("MODE");
expectedResults.push({
    "name": "BeagleBoneBlue",
    "search": /^((E[1234]|GP[01]|S1_[12]|I2C|UT[015]|ADC|DSM2)_|RED|GREEN|BAT|PAUSE|MODE)/,
    "keys": blueKeys
});

var results = {};

for(var i=0; i < expectedResults.length; i++) {
    var er = expectedResults[i];
    exports['testBoneGetPinKeys' + er.name] = makeTest(i);
}<commit_msg>Update test-bone.js<commit_after>//process.env.DEBUG = true;
var bone = require('bonescript').bone;

var expectedResults = [];

expectedResults.push({
    "name": "LEDs",
    "search": /^USR/,
    "keys": ["USR0", "USR1", "USR2", "USR3"]
});

var pbKeys = [];
for(var i=1; i<=36; i++) {
    pbKeys.push("P1_" + i);
    pbKeys.push("P2_" + i);
}
expectedResults.push({
    "name": "PocketBeagleHeaders",
    "search": /^P[12]/,
    "keys": pbKeys
});

var boneKeys = [];
for(var i=1; i<=46; i++) {
    boneKeys.push("P8_" + i);
    boneKeys.push("P9_" + i);
}
boneKeys.push("P9_15B");
boneKeys.push("P9_41B");
boneKeys.push("P9_42B");
expectedResults.push({
    "name": "BeagleBoneHeaders",
    "search": /^P[89]/,
    "keys": boneKeys
});

var ainKeys = [];
for(var i=0; i<=7; i++) {
    ainKeys.push("A" + i);
}
expectedResults.push({
    "name": "AnalogInPins",
    "search": /^A[0-7]/,
    "keys": ainKeys
});

var gpioKeys = [];
for(var i=0; i<=117; i++) {
    gpioKeys.push("GPIO_" + i);
}
expectedResults.push({
    "name": "GPIOPins",
    "search": /^GPIO_/,
    "keys": gpioKeys
});
// removes must be done high-to-low to keep indexes valid
gpioKeys.splice(108,1); // remove GPIO3_12
gpioKeys.splice(107,1); // remove GPIO3_11
gpioKeys.splice(25,1); // remove GPIO0_25
gpioKeys.splice(24,1); // remove GPIO0_24

var eepromKeys = [];
for(var i=0; i<74; i++) {
    eepromKeys.push("EEPROM_" + i);
}
expectedResults.push({
    "name": "EEPROM",
    "search": /^EEPROM_/,
    "keys": eepromKeys
});

var blueKeys = [];
for(var i=1; i<=6; i++) {
    blueKeys.push("GP0_" + i);
    blueKeys.push("GP1_" + i);
    blueKeys.push("S1_1_" + i);
    blueKeys.push("S1_2_" + i);
    blueKeys.push("ADC_" + i);
}
for(var i=2; i<=6; i++) {
    blueKeys.push("GPS_" + i);
}
for(var i=1; i<=4; i++) {
    for(var j=1; j<=4; j++) {
        blueKeys.push("E" + j + "_" + i);
    }
    blueKeys.push("I2C_" + i);
    blueKeys.push("UT0_" + i);
    blueKeys.push("UT1_" + i);
    blueKeys.push("UT5_" + i);
}
for(var i=1; i<=3; i++) {
    blueKeys.push("DSM2_" + i);
}
blueKeys.push("RED");
blueKeys.push("GREEN");
blueKeys.push("BAT25");
blueKeys.push("BAT50");
blueKeys.push("BAT75");
blueKeys.push("BAT100");
blueKeys.push("PAUSE");
blueKeys.push("MODE");
expectedResults.push({
    "name": "BeagleBoneBlue",
    "search": /^((E[1234]|GP[01]|GPS|S1_[12]|I2C|UT[015]|ADC|DSM2)_|RED|GREEN|BAT|PAUSE|MODE)/,
    "keys": blueKeys
});

var results = {};

for(var i=0; i < expectedResults.length; i++) {
    var er = expectedResults[i];
    exports['testBoneGetPinKeys' + er.name] = makeTest(i);
}
{'fraction_non_alphanumeric': 0.23884361660845946, 'fraction_numerical': 0.042297244858362434, 'mean_word_length': 3.782003710575139, 'pattern_counts': {'":': 42, '<': 25, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4778523', 'n_tokens_mistral': 2295, 'n_tokens_neox': 2185, 'n_words': 391}