我需要导出很多变量,例如导出x1 = 1导出x2 = 2
我移动了文件 .env 中的所有变量并尝试
source .env
之后我执行了
printenv
并且所有这些变量都不在环境变量列表中。我也尝试过,
export $(xargs <.env)
但我在 .env 文件中注释了行,并且收到以下消息
#': not a valid identifier
那么如何从文件中导出变量并跳过注释行呢?
我需要验证文本标签,但它包含动态部分,所以我尝试使用正则表达式,但它不起作用.
expect(aboutPage.userInterfaceText.getText()).toMatch('/- User Interface: v \d+\.\d+\.\d+/');
Run Code Online (Sandbox Code Playgroud)
我总是得到下一个错误:
- Expected '- User Interface: v 4.4.63' to match '/- User Interface: v d+.d+.d+/'.
Run Code Online (Sandbox Code Playgroud)