Fix typos and examples in vscode examples
This commit is contained in:
@@ -33,7 +33,7 @@ def check_json_keybindings(actual: str, expected: str, **options) -> float:
|
||||
break
|
||||
else:
|
||||
return 0.0
|
||||
expected = expected['expect']
|
||||
expected = expected['expected']
|
||||
if expected in data:
|
||||
return 1.0
|
||||
else:
|
||||
@@ -55,7 +55,7 @@ def check_json_settings(actual: str, expected: str, **options) -> float:
|
||||
with open(actual, 'r') as f:
|
||||
data = json.load(f)
|
||||
|
||||
expect = expected['expect']
|
||||
expect = expected['expected']
|
||||
data_copy = copy.deepcopy(data)
|
||||
data_copy.update(expect)
|
||||
if data == data_copy:
|
||||
@@ -93,7 +93,7 @@ def compare_config(actual: str, rules: Dict, **options) -> float:
|
||||
with open(actual) as f1:
|
||||
actual_text = f1.read()
|
||||
|
||||
if actual_text == rules['expect']:
|
||||
if actual_text == rules['expected']:
|
||||
return 1.0
|
||||
return 0.0
|
||||
|
||||
@@ -110,7 +110,7 @@ def compare_answer(actual: str, rules: Dict, **options) -> float:
|
||||
if not actual:
|
||||
return 0.
|
||||
|
||||
if actual == rules['expect']:
|
||||
if actual == rules['expected']:
|
||||
return 1.0
|
||||
|
||||
# TODO: can use text embedding to get non-zero return
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {
|
||||
"expected": {
|
||||
"editor.wordWrapColumn": 50
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {}
|
||||
"expected": {}
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": "project"
|
||||
"expected": "project"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {
|
||||
"expected": {
|
||||
"folders": [
|
||||
{"path": "project"},
|
||||
{"path": "data1"},
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {
|
||||
"expected": {
|
||||
"files.autoSave": "afterDelay",
|
||||
"files.autoSaveDelay": 500
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect":
|
||||
"expected":
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "workbench.action.focusActiveEditorGroup",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {"debug.focusEditorOnBreak": false}
|
||||
"expected": {"debug.focusEditorOnBreak": false}
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
{
|
||||
"id": "982d12a5-beab-424f-8d38-d2a48429e511",
|
||||
"snapshot": "vscode",
|
||||
"instruction": "Please help me change the color theme of VS Code to Dark.",
|
||||
"instruction": "Please help me change the color theme of VS Code to Visual Studio Dark.",
|
||||
"source": "https://www.youtube.com/watch?v=ORrELERGIHs",
|
||||
"config": [
|
||||
{
|
||||
"type": "command",
|
||||
"parameters": {
|
||||
"command": "SETTINGS_PATH=\"$HOME/.config/Code/User/settings.json\"; [ ! -f \"$SETTINGS_PATH\" ] && echo '{\"workbench.colorTheme\": \"Red\"}' > \"$SETTINGS_PATH\" || (grep -q \"workbench.colorTheme\" \"$SETTINGS_PATH\" && sed -i 's/\"workbench.colorTheme\": \"[^\"]*\"/\"workbench.colorTheme\": \"Red\"/' \"$SETTINGS_PATH\" || jq '. + {\"workbench.colorTheme\": \"Red\"}' \"$SETTINGS_PATH\" > temp.json && mv temp.json \"$SETTINGS_PATH\")",
|
||||
"shell": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "launch",
|
||||
"parameters": {
|
||||
@@ -28,14 +35,13 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": "2"
|
||||
"expected": "{\"workbench.colorTheme\": \"Visual Studio Dark\"}\n"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"type": "vscode_config",
|
||||
"vscode_extension_command": "GetColorTheme",
|
||||
"path": "/home/user/GetColorTheme.txt",
|
||||
"dest": "GetColorTheme.txt"
|
||||
"type": "vm_file",
|
||||
"path": "/home/user/.config/Code/User/settings.json",
|
||||
"dest": "settings.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {"workbench.editor.wrapTabs": true}
|
||||
"expected": {"workbench.editor.wrapTabs": true}
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {
|
||||
"expected": {
|
||||
"files.exclude": {
|
||||
"**/__pycache__": true
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect": {
|
||||
"expected": {
|
||||
"python.analysis.diagnosticSeverityOverrides": {"reportMissingImports": "none"}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expect":
|
||||
"expected":
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "-list.find",
|
||||
|
||||
Reference in New Issue
Block a user