Skip to content

Commit bdd8a5e

Browse files
committed
Re-enable plugin tests again partially
1 parent 3f90d1b commit bdd8a5e

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ matrix:
6161

6262
script:
6363
- ./script/ci-build-libsass
64+
- ./script/ci-build-plugin math
65+
- ./script/ci-build-plugin glob
66+
- ./script/ci-build-plugin digest
67+
- ./script/ci-build-plugin img-size
68+
- ./script/ci-build-plugin tests
6469
before_install: ./script/ci-install-deps
6570
install: ./script/ci-install-compiler
6671
after_success: ./script/ci-report-coverage

script/ci-build-plugin

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,7 @@ fi
3434

3535
mkdir -p plugins
3636
if [ ! -d plugins/libsass-${PLUGIN} ] ; then
37-
if [ "$PLUGIN" == "math" ]; then
38-
git clone https://github.com/mgreter/libsass-${PLUGIN} plugins/libsass-${PLUGIN} --branch feature/libsass-3.7
39-
elif [ "$PLUGIN" == "tests" ]; then
40-
git clone https://github.com/mgreter/libsass-${PLUGIN} plugins/libsass-${PLUGIN} --branch feature/libsass-4.0
41-
else
42-
git clone https://github.com/mgreter/libsass-${PLUGIN} plugins/libsass-${PLUGIN}
43-
fi
37+
git clone https://github.com/mgreter/libsass-${PLUGIN} plugins/libsass-${PLUGIN} --branch feature/libsass-4.0
4438
fi
4539
if [ ! -d plugins/libsass-${PLUGIN}/build ] ; then
4640
mkdir plugins/libsass-${PLUGIN}/build
@@ -56,11 +50,11 @@ cd ../../..
5650

5751
# glob only works on paths relative to imports
5852
if [ "x$PLUGIN" == "xglob" ]; then
59-
${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build ${SASS_SPEC_SPEC_DIR}/basic/input.scss > ${SASS_SPEC_SPEC_DIR}/basic/result.css
60-
${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build ${SASS_SPEC_SPEC_DIR}/basic/input.scss --sourcemap > /dev/null
53+
${SASSC_BIN} --precision 10 --plugin-path plugins/libsass-${PLUGIN}/build ${SASS_SPEC_SPEC_DIR}/basic/input.scss > ${SASS_SPEC_SPEC_DIR}/basic/result.css
54+
# ${SASSC_BIN} --precision 10 --plugin-path plugins/libsass-${PLUGIN}/build ${SASS_SPEC_SPEC_DIR}/basic/input.scss --sourcemap > /dev/null
6155
else
6256
cat ${SASS_SPEC_SPEC_DIR}/basic/input.scss | ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build -I ${SASS_SPEC_SPEC_DIR}/basic > ${SASS_SPEC_SPEC_DIR}/basic/result.css
63-
cat ${SASS_SPEC_SPEC_DIR}/basic/input.scss | ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build -I ${SASS_SPEC_SPEC_DIR}/basic --sourcemap > /dev/null
57+
# cat ${SASS_SPEC_SPEC_DIR}/basic/input.scss | ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build -I ${SASS_SPEC_SPEC_DIR}/basic --sourcemap > /dev/null
6458
fi
6559
RETVAL=$?; if [ "$RETVAL" != "0" ]; then exit $RETVAL; fi
6660

src/compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ namespace Sass {
667667
else if (endsWithIgnoreCase(abs_path, ".scss", 5)) {
668668
format = SASS_IMPORT_SCSS;
669669
}
670-
else {
670+
else if (abs_path != "stream://stdin") {
671671
throw Exception::UnknwonImport(callStack);
672672
}
673673
}

src/eval.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,11 +1272,9 @@ namespace Sass {
12721272
ExternalCallable* def = static_cast<ExternalCallable*>(fn);
12731273
SassFunctionLambda lambda = def->lambda();
12741274
struct SassValue* c_args = sass_make_list(SASS_COMMA, false);
1275-
std::cerr << "Create c_args with " << Value::unwrap(c_args).refcount << "\n";
12761275
sass_list_push(c_args, Value::wrap(message));
12771276
struct SassValue* c_val = lambda(
12781277
c_args, compiler.wrap());
1279-
std::cerr << "After c_args with " << Value::unwrap(c_args).refcount << "\n";
12801278
sass_delete_value(c_args);
12811279
sass_delete_value(c_val);
12821280
}
@@ -1833,10 +1831,8 @@ namespace Sass {
18331831
return toCss(interpolation->value(), false);
18341832
}
18351833
else if (SupportsDeclaration* declaration = condition->isaSupportsDeclaration()) {
1836-
sass::string strm("(");
1837-
strm += toCss(declaration->feature()); strm += ": ";
1838-
strm += toCss(declaration->value()); strm += ")";
1839-
return strm;
1834+
return "(" + toCss(declaration->feature()) + ": "
1835+
+ toCss(declaration->value()) + ")";
18401836
}
18411837
else if (SupportsFunction* function = condition->isaSupportsFunction()) {
18421838
return acceptInterpolation(function->name(), false)

0 commit comments

Comments
 (0)