mirror of
https://github.com/RubyMetric/chsrc
synced 2025-10-10 14:43:29 +08:00
Test parser hierarchy
This commit is contained in:
74
tool/rawstr4c/test/fixture/test-hierarchy-with-global.md
Normal file
74
tool/rawstr4c/test/fixture/test-hierarchy-with-global.md
Normal file
@@ -0,0 +1,74 @@
|
||||
- global-prefix = `GLOBAL_`
|
||||
- global-output = `:terminal`
|
||||
|
||||
```c
|
||||
int global_code_block = 1;
|
||||
```
|
||||
|
||||
some comments
|
||||
|
||||
|
||||
|
||||
# Java
|
||||
|
||||
- java-prefix = `JAVA_`
|
||||
|
||||
## Maven Config
|
||||
|
||||
- maven-name = `maven`
|
||||
|
||||
```xml
|
||||
<settings>
|
||||
<mirrors>
|
||||
</mirrors>
|
||||
</settings>
|
||||
```
|
||||
|
||||
## Gradle Config
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://example.com' }
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Python
|
||||
|
||||
- python-prefix = `PYTHON_`
|
||||
|
||||
## pip config
|
||||
|
||||
```bash
|
||||
pip config set global.index-url https://example.com
|
||||
```
|
||||
|
||||
## conda config
|
||||
|
||||
- language = `yaml`
|
||||
|
||||
```
|
||||
channels:
|
||||
- https://example.com/conda
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Docker
|
||||
|
||||
## Dockerfile
|
||||
|
||||
```dockerfile
|
||||
FROM ubuntu:20.04
|
||||
RUN echo "Hello World"
|
||||
```
|
||||
|
||||
### Multi-stage Build
|
||||
|
||||
```dockerfile
|
||||
FROM node:16 AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN npm install
|
||||
```
|
63
tool/rawstr4c/test/fixture/test-hierarchy-without-global.md
Normal file
63
tool/rawstr4c/test/fixture/test-hierarchy-without-global.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Java
|
||||
|
||||
- java-prefix = `JAVA_`
|
||||
|
||||
## Maven Config
|
||||
|
||||
- maven-name = `maven`
|
||||
|
||||
```xml
|
||||
<settings>
|
||||
<mirrors>
|
||||
</mirrors>
|
||||
</settings>
|
||||
```
|
||||
|
||||
## Gradle Config
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://example.com' }
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Python
|
||||
|
||||
- python-prefix = `PYTHON_`
|
||||
|
||||
## pip config
|
||||
|
||||
```bash
|
||||
pip config set global.index-url https://example.com
|
||||
```
|
||||
|
||||
## conda config
|
||||
|
||||
- language = `yaml`
|
||||
|
||||
```
|
||||
channels:
|
||||
- https://example.com/conda
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Docker
|
||||
|
||||
## Dockerfile
|
||||
|
||||
```dockerfile
|
||||
FROM ubuntu:20.04
|
||||
RUN echo "Hello World"
|
||||
```
|
||||
|
||||
### Multi-stage Build
|
||||
|
||||
```dockerfile
|
||||
FROM node:16 AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN npm install
|
||||
```
|
@@ -1,65 +0,0 @@
|
||||
# Global Config
|
||||
|
||||
- prefix = `TEST_`
|
||||
- output = `:terminal`
|
||||
- translate = `:escape`
|
||||
|
||||
## Java
|
||||
|
||||
### Maven Config
|
||||
|
||||
- name = `maven_settings`
|
||||
|
||||
```xml
|
||||
<mirror>
|
||||
<id>test</id>
|
||||
<name>Test Mirror</name>
|
||||
<url>https://example.com</url>
|
||||
</mirror>
|
||||
```
|
||||
|
||||
### Gradle Config
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://example.com' }
|
||||
}
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
- prefix = `PY_`
|
||||
|
||||
### pip config
|
||||
|
||||
```ini
|
||||
[global]
|
||||
index-url = https://example.com/simple
|
||||
```
|
||||
|
||||
### conda config
|
||||
|
||||
- language = `yaml`
|
||||
|
||||
```
|
||||
channels:
|
||||
- https://example.com/conda
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
### Dockerfile
|
||||
|
||||
```dockerfile
|
||||
FROM ubuntu:20.04
|
||||
RUN echo "Hello World"
|
||||
```
|
||||
|
||||
#### Multi-stage Build
|
||||
|
||||
```dockerfile
|
||||
FROM node:16 AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN npm install
|
||||
```
|
Reference in New Issue
Block a user