test: add more languages
This commit is contained in:
parent
7cc7b8b31a
commit
cb45761e42
15 changed files with 2159 additions and 4 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -13,7 +13,7 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = {
|
|||
slidingWindowSize: 500,
|
||||
maxSnippetPercentage: 0.6,
|
||||
recentlyEditedSimilarityThreshold: 0.3,
|
||||
useCache: true,
|
||||
useCache: false,
|
||||
onlyMyCode: true,
|
||||
useOtherFiles: true,
|
||||
useRecentlyEdited: true,
|
||||
|
|
|
|||
18
manual-testing-sandbox/Dockerfile
Normal file
18
manual-testing-sandbox/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Use a base image
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements file and install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
# Set environment variables
|
||||
ENV PORT=8080
|
||||
|
||||
# Start the application
|
||||
CMD ["python", "app.py"]
|
||||
14
manual-testing-sandbox/config.yaml
Normal file
14
manual-testing-sandbox/config.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
AWSTemplateFormatVersion: "2010-09-09"
|
||||
Description: Sample CloudFormation template
|
||||
|
||||
Resources:
|
||||
S3Bucket:
|
||||
Type: "AWS::S3::Bucket"
|
||||
Properties:
|
||||
BucketName: my-sample-bucket
|
||||
|
||||
EC2Instance:
|
||||
Type: "AWS::EC2::Instance"
|
||||
Properties:
|
||||
InstanceType: "t2.micro"
|
||||
ImageId: "ami-0abcdef12345abcdef"
|
||||
8
manual-testing-sandbox/data.json
Normal file
8
manual-testing-sandbox/data.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"employees": [
|
||||
{ "name": "John Doe", "age": 30, "position": "Developer" },
|
||||
{ "name": "Jane Smith", "age": 25, "position": "Designer" },
|
||||
{ "name": "Emily Johnson", "age": 35, "position": "Manager" }
|
||||
],
|
||||
"active": true
|
||||
}
|
||||
34
manual-testing-sandbox/program.cs
Normal file
34
manual-testing-sandbox/program.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
Calculator calc = new Calculator();
|
||||
calc.Add(5).Subtract(3);
|
||||
Console.WriteLine("Result: " + calc.GetResult());
|
||||
}
|
||||
|
||||
public class Calculator
|
||||
{
|
||||
private double result;
|
||||
|
||||
public Calculator Add(double number)
|
||||
{
|
||||
result += number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Calculator Subtract(double number)
|
||||
{
|
||||
result -= number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public double GetResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
manual-testing-sandbox/query.sql
Normal file
9
manual-testing-sandbox/query.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE employees (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
age INT NOT NULL,
|
||||
position VARCHAR(100)
|
||||
);
|
||||
|
||||
INSERT INTO employees (name, age, position) VALUES ('John Doe', 30, 'Developer');
|
||||
SELECT * FROM employees WHERE age > 25;
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
The sole purpose of this folder is to open it when debugging the extension.
|
||||
The sole purpose of this folder is to open it when debugging the extension.
|
||||
It is not used by the extension itself.
|
||||
You can add more files that can be useful when manually testing the extension.
|
||||
You can add more files that can be useful when manually testing the extension.
|
||||
|
|
|
|||
|
|
@ -33,4 +33,4 @@ a {
|
|||
|
||||
.button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
25
manual-testing-sandbox/test.html
Normal file
25
manual-testing-sandbox/test.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Sample Page</title>
|
||||
<link rel="stylesheet" href="test.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>Welcome to the Sample Page</h1>
|
||||
<nav>
|
||||
<a href="#home">Home</a>
|
||||
<a href="#about">About</a>
|
||||
<a href="#contact">Contact</a>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="container">
|
||||
<p>This is a sample paragraph.</p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
28
manual-testing-sandbox/test.java
Normal file
28
manual-testing-sandbox/test.java
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
public class Calculator {
|
||||
private double result;
|
||||
|
||||
public Calculator add(double number) {
|
||||
result += number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Calculator subtract(double number) {
|
||||
result -= number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public double getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Calculator reset() {
|
||||
result = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Calculator calc = new Calculator();
|
||||
calc.add(10).subtract(5);
|
||||
System.out.println("Result: " + calc.getResult());
|
||||
}
|
||||
}
|
||||
44
manual-testing-sandbox/test.php
Normal file
44
manual-testing-sandbox/test.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
class Calculator {
|
||||
private $result = 0.0;
|
||||
|
||||
public function add($number) {
|
||||
$this->result += $number;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function subtract($number) {
|
||||
$this->result -= $number;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function multiply($number) {
|
||||
$this->result *= $number;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function divide($number) {
|
||||
if ($number != 0) {
|
||||
$this->result /= $number;
|
||||
} else {
|
||||
echo "Division by zero error.";
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getResult() {
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
public function reset() {
|
||||
$this->result = 0.0;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
$calc = new Calculator();
|
||||
$calc->add(10)->subtract(5);
|
||||
echo "Result: " . $calc->getResult() . "\n";
|
||||
|
||||
?>
|
||||
18
manual-testing-sandbox/test.py
Normal file
18
manual-testing-sandbox/test.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
class Calculator:
|
||||
def __init__(self):
|
||||
self.result = 0
|
||||
|
||||
def add(self, number):
|
||||
self.result += number
|
||||
return self
|
||||
|
||||
def subtract(self, number):
|
||||
self.result -= number
|
||||
return self
|
||||
|
||||
def reset(self):
|
||||
self.result = 0
|
||||
return self
|
||||
|
||||
def get_result(self):
|
||||
return self.result
|
||||
30
manual-testing-sandbox/test.rb
Normal file
30
manual-testing-sandbox/test.rb
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
class Calculator
|
||||
attr_accessor :result
|
||||
|
||||
def initialize
|
||||
@result = 0
|
||||
end
|
||||
|
||||
def add(number)
|
||||
@result += number
|
||||
self
|
||||
end
|
||||
|
||||
def subtract(number)
|
||||
@result -= number
|
||||
self
|
||||
end
|
||||
|
||||
def get_result
|
||||
@result
|
||||
end
|
||||
|
||||
def reset
|
||||
@result = 0
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
calc = Calculator.new
|
||||
calc.add(5).subtract(3)
|
||||
puts "Result: #{calc.get_result}"
|
||||
21
manual-testing-sandbox/test.sh
Normal file
21
manual-testing-sandbox/test.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
function calculate {
|
||||
local a=$1
|
||||
local b=$2
|
||||
local op=$3
|
||||
local result
|
||||
|
||||
case $op in
|
||||
"+") result=$((a + b)) ;;
|
||||
"-") result=$((a - b)) ;;
|
||||
"*") result=$((a * b)) ;;
|
||||
"/") result=$((a / b)) ;;
|
||||
*) echo "Invalid operator"; exit 1 ;;
|
||||
esac
|
||||
|
||||
echo "Result: $result"
|
||||
}
|
||||
|
||||
calculate 10 5 "+"
|
||||
calculate 10 3 "-"
|
||||
Loading…
Add table
Reference in a new issue